lib/awestruct/page.rb in awestruct-0.5.4 vs lib/awestruct/page.rb in awestruct-0.5.4.1

- old
+ new

@@ -10,10 +10,11 @@ class Page < Awestruct::AStruct attr_accessor :site attr_accessor :handler attr_reader :dependencies + attr_writer :partial def initialize(site, handler=nil) @site = site case (handler) when Page @@ -90,10 +91,12 @@ end def stale_output?(output_path) return true if ! File.exist?( output_path ) return true if input_mtime > File.mtime( output_path ) + return true if stale? + # TODO: Add stale callback and execute it false end def input_mtime handler.input_mtime( self ) @@ -173,9 +176,13 @@ rendered_content( create_context(), with_layouts ) end def ==(other_page) self.object_id == other_page.object_id + end + + def is_partial? + @partial end end end