class Potion::Post

Attributes

static_files[RW]

Public Class Methods

new(path, site) click to toggle source
Calls superclass method Potion::Renderable::new
# File lib/potion/post.rb, line 5
def initialize(path, site)
  @static_files = Dir[File.dirname(path) + "/*.*"].reject {|x| x == path}.map {|x| Potion::StaticFile.new(x, site)}
                  
  @relative_output_path = path.gsub("_posts/", "")
                          
  super(path, site)
end

Public Instance Methods

write() click to toggle source
Calls superclass method Potion::Renderable#write
# File lib/potion/post.rb, line 13
def write
  @static_files.each {|file| file.write }
  super
end