Sha256: d643fc06c39491c61bdf3af698aa76367e59e2b20378c652d9bc101845a7b027
Contents?: true
Size: 952 Bytes
Versions: 17
Compression:
Stored size: 952 Bytes
Contents
module Jekyll class Layout include Convertible # Gets the Site object. attr_reader :site # Gets the name of this layout. attr_reader :name # 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
17 entries across 17 versions & 2 rubygems