Class: Nanoc::Core::MutableLayoutCollectionView
- Inherits:
-
MutableIdentifiableCollectionView
- Object
- View
- IdentifiableCollectionView
- MutableIdentifiableCollectionView
- Nanoc::Core::MutableLayoutCollectionView
- Defined in:
- lib/nanoc/core/mutable_layout_collection_view.rb
Constant Summary
Constants inherited from IdentifiableCollectionView
IdentifiableCollectionView::NOTHING
Instance Method Summary collapse
-
#create(content, attributes, identifier) ⇒ self
Creates a new layout and adds it to the site’s collection of layouts.
- #view_class ⇒ Object private
Methods inherited from MutableIdentifiableCollectionView
Methods inherited from IdentifiableCollectionView
#[], #_unwrap, #each, #find_all, #initialize, #size, #where
Methods inherited from View
#_context, #_unwrap, #frozen?, #initialize, #inspect
Methods included from ContractsSupport
enabled?, included, setup_once, warn_about_performance
Constructor Details
This class inherits a constructor from Nanoc::Core::IdentifiableCollectionView
Instance Method Details
#create(content, attributes, identifier) ⇒ self
Creates a new layout and adds it to the site’s collection of layouts.
20 21 22 23 |
# File 'lib/nanoc/core/mutable_layout_collection_view.rb', line 20 def create(content, attributes, identifier) @objects = @objects.add(Nanoc::Core::Layout.new(content, attributes, identifier)) self end |
#view_class ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 |
# File 'lib/nanoc/core/mutable_layout_collection_view.rb', line 7 def view_class Nanoc::Core::MutableLayoutView end |