lib/stack/generator.rb in stack-0.0.5 vs lib/stack/generator.rb in stack-0.0.6

- old
+ new

@@ -5,10 +5,12 @@ attr_accessor :children attr_accessor :layouts attr_accessor :pages + attr_accessor :processed_at, :transformed_at + def initialize(source, target, parent = nil) self.source = source self.target = target self.parent = parent @@ -22,10 +24,12 @@ process! end def process! + self.processed_at = Time.now + read_layouts read_pages read_children end @@ -48,10 +52,12 @@ self.children.push(Stack::Generator.new(File.join(self.source, dir), File.join(self.target, dir), self)) end end def transform! + self.transformed_at = Time.now + self.pages.each do |name, page| page.write! end transform_assets @@ -72,10 +78,12 @@ end end def to_hash { - + :processed_at => self.processed_at, + :transformed_at => self.transformed_at, + :time => Time.now } end private def read_pages_from_directory(folder, transformable_klass) \ No newline at end of file