Sha256: d164c7fbf73211c8f8df00c44e292c2aa2a239a54fffe97fe2820d87333a1089

Contents?: true

Size: 670 Bytes

Versions: 10

Compression:

Stored size: 670 Bytes

Contents

module Nanoc

  # Nanoc::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

10 entries across 10 versions & 1 rubygems

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