Class: Nanoc2::AssetDefaults

Inherits:
Defaults show all
Defined in:
lib/nanoc2/base/asset_defaults.rb

Overview

Nanoc2::AssetDefaults represent the default attributes for all assets in the site. If a specific asset attribute is requested, but not found, then the asset defaults will be queried for this attribute. (If the attribute doesn’t even exist in the asset defaults, hardcoded defaults will be used.)

Instance Attribute Summary

Attributes inherited from Defaults

#attributes, #mtime, #site

Instance Method Summary collapse

Methods inherited from Defaults

#initialize

Constructor Details

This class inherits a constructor from Nanoc2::Defaults

Instance Method Details

#saveObject

Saves the asset 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 asset defaults.



13
14
15
16
17
# File 'lib/nanoc2/base/asset_defaults.rb', line 13

def save
  @site.data_source.loading do
    @site.data_source.save_asset_defaults(self)
  end
end