Sha256: 5feb78db560fb12dce354fc3cf7a4de9d31f61302e4a1871f04bd538ab761481

Contents?: true

Size: 668 Bytes

Versions: 1

Compression:

Stored size: 668 Bytes

Contents

module Nanoc
  class LayoutView
    # @api private
    def initialize(layout)
      @layout = layout
    end

    # @api private
    def unwrap
      @layout
    end

    # @see Object#==
    def ==(other)
      identifier == other.identifier
    end
    alias_method :eql?, :==

    # @see Object#hash
    def hash
      self.class.hash ^ identifier.hash
    end

    # @return [Nanoc::Identifier]
    def identifier
      @layout.identifier
    end

    # @see Hash#[]
    def [](key)
      @layout[key]
    end

    # @api private
    def reference
      @layout.reference
    end

    # @api private
    def raw_content
      @layout.raw_content
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nanoc-4.0.0b3 lib/nanoc/base/views/layout.rb