Sha256: a742640d3b3a32df1d202264f0c5c2e2266f8dc08a35d50632f6fa308000c5c7
Contents?: true
Size: 892 Bytes
Versions: 2
Compression:
Stored size: 892 Bytes
Contents
module Monad class Layout include Convertible # Gets the Site object. attr_reader :site # Gets/Sets the extension of this layout. attr_accessor :ext # 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 - 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 self.data = {} self.process(name) self.read_yaml(base, name) end # Extract information from the layout filename. # # name - The String filename of the layout file. # # Returns nothing. def process(name) self.ext = File.extname(name) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
monad-0.0.2 | lib/monad/layout.rb |
monad-0.0.1 | lib/monad/layout.rb |