lib/webby/resources/partial.rb in webby-0.9.0 vs lib/webby/resources/partial.rb in webby-0.9.1
- old
+ new
@@ -22,24 +22,24 @@
# convention).
#
def initialize( fn )
super
- @mdata = ::Webby::Resources::File.meta_data(@path)
- @mdata ||= {}
- @mdata.sanitize!
+ @_meta_data = MetaFile.meta_data(@path)
+ @_meta_data ||= {}
+ @_meta_data.sanitize!
end
# call-seq:
# dirty? => true or false
#
# Returns +true+ if this resource is newer than its corresponding output
# product. The resource needs to be rendered (if a page or layout) or
# copied (if a static file) to the output directory.
#
def dirty?
- return @mdata['dirty'] if @mdata.has_key? 'dirty'
+ return _meta_data['dirty'] if _meta_data.has_key? 'dirty'
# if the destination file does not exist, then we are dirty
return true unless test(?e, destination)
# if this file's mtime is larger than the destination file's
@@ -70,9 +70,15 @@
# Partials do not have a URL. This method will alwasy return +nil+.
#
def url
nil
end
+
+ # :stopdoc:
+ def _read
+ MetaFile.read(@path)
+ end
+ # :startdoc:
end # class Partial
end # module Webby::Resources
# EOF