Sha256: 1ea5c43e92b703e8491ab10f1154f9aeadafbe71b97a3c7812bdbd6d2fadea0a

Contents?: true

Size: 672 Bytes

Versions: 1

Compression:

Stored size: 672 Bytes

Contents

module Nanoc2

  # Nanoc2::PageDefaults represent the default attributes for all pages in the
  # site. If a specific page attribute is requested, but not found, then the
  # page defaults will be queried for this attribute. (If the attribute
  # doesn't even exist in the page defaults, hardcoded defaults will be used.)
  class PageDefaults < Defaults

    # Saves the page defaults in the database, creating it if it doesn't exist
    # yet or updating it if it already exists. Tells the site's data source to
    # save the page defaults.
    def save
      @site.data_source.loading do
        @site.data_source.save_page_defaults(self)
      end
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nanoc2-2.2.3 lib/nanoc2/base/page_defaults.rb