lib/jekyll/layout.rb in jekyll-0.10.0 vs lib/jekyll/layout.rb in jekyll-0.11.0
- old
+ new
@@ -1,20 +1,27 @@
module Jekyll
class Layout
include Convertible
- attr_accessor :site
+ # Gets the Site object.
+ attr_reader :site
+
+ # Gets/Sets the extension of this layout.
attr_accessor :ext
- attr_accessor :data, :content
+ # Gets/Sets the Hash that holds the metadata for this layout.
+ attr_accessor :data
+
+ # Gets/Sets the content of this layout.
+ attr_accessor :content
+
# Initialize a new Layout.
- # +site+ is the Site
- # +base+ is the String path to the <source>
- # +name+ is the String filename of the post file
#
- # Returns <Page>
+ # site - The Site.
+ # base - The String path to the source.
+ # name - The String filename of the post file.
def initialize(site, base, name)
@site = site
@base = base
@name = name
@@ -22,15 +29,16 @@
self.process(name)
self.read_yaml(base, name)
end
- # Extract information from the layout filename
- # +name+ is the String filename of the layout file
+ # Extract information from the layout filename.
#
- # Returns nothing
+ # name - The String filename of the layout file.
+ #
+ # Returns nothing.
def process(name)
self.ext = File.extname(name)
end
end
-end
\ No newline at end of file
+end