Class: Nanoc2::PageDefaults
- Defined in:
- lib/nanoc2/base/page_defaults.rb
Overview
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.)
Instance Attribute Summary
Attributes inherited from Defaults
Instance Method Summary collapse
-
#save ⇒ Object
Saves the page defaults in the database, creating it if it doesn’t exist yet or updating it if it already exists.
Methods inherited from Defaults
Constructor Details
This class inherits a constructor from Nanoc2::Defaults
Instance Method Details
#save ⇒ Object
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.
12 13 14 15 16 |
# File 'lib/nanoc2/base/page_defaults.rb', line 12 def save @site.data_source.loading do @site.data_source.save_page_defaults(self) end end |