Sha256: 15ec6aa434146822a01f722adb3cfeb1c113518d0a6aa1e310dc1bb99a62c188

Contents?: true

Size: 644 Bytes

Versions: 1

Compression:

Stored size: 644 Bytes

Contents

module Jekyll
  class Layout
    include Convertible

    attr_accessor :ext
    attr_accessor :data, :content

    # Initialize a new Layout.
    #   +base+ is the String path to the <source>
    #   +name+ is the String filename of the post file
    #
    # Returns <Page>
    def initialize(base, name)
      @base = base
      @name = name

      self.data = {}
      self.process(name)
      self.read_yaml(base, name)
    end

    # Extract information from the layout filename
    #   +name+ is the String filename of the layout file
    #
    # Returns nothing
    def process(name)
      self.ext = File.extname(name)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tristandunn-jekyll-0.3.0 lib/jekyll/layout.rb