Sha256: 0f7e79ad688bed86f4850add858fafa30eb5aae297cec2745cb8ec66f948637d

Contents?: true

Size: 797 Bytes

Versions: 10

Compression:

Stored size: 797 Bytes

Contents

module Nanoc

  # Nanoc::Defaults represent the default attributes for a given set of
  # objects in the site. It is basically a hash with an optional modification
  # time.
  class Defaults

    # Th site where this set of defaults belongs to.
    attr_accessor :site

    # A hash containing the default attributes.
    attr_reader   :attributes

    # The time when this set of defaults was last modified.
    attr_reader   :mtime

    # Creates a new set of defaults.
    #
    # +attributes+:: The hash containing the metadata that individual objects
    #                will override.
    #
    # +mtime+:: The time when the defaults were last modified (optional).
    def initialize(attributes, mtime=nil)
      @attributes = attributes.clean
      @mtime      = mtime
    end

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
nanoc-2.1.1 lib/nanoc/base/defaults.rb
nanoc-2.1.5 lib/nanoc/base/defaults.rb
nanoc-2.2 lib/nanoc/base/defaults.rb
nanoc-2.1 lib/nanoc/base/defaults.rb
nanoc-2.1.2 lib/nanoc/base/defaults.rb
nanoc-2.1.3 lib/nanoc/base/defaults.rb
nanoc-2.1.4 lib/nanoc/base/defaults.rb
nanoc-2.1.6 lib/nanoc/base/defaults.rb
nanoc-2.2.1 lib/nanoc/base/defaults.rb
nanoc-2.2.2 lib/nanoc/base/defaults.rb