Class: Nanoc::MutableItemCollectionView
- Inherits:
-
MutableIdentifiableCollectionView
- Object
- View
- IdentifiableCollectionView
- MutableIdentifiableCollectionView
- Nanoc::MutableItemCollectionView
- Defined in:
- lib/nanoc/base/views/mutable_item_collection_view.rb
Instance Method Summary collapse
-
#create(content, attributes, identifier, binary: false, filename: nil) ⇒ self
Creates a new item and adds it to the site’s collection of items.
Methods inherited from MutableIdentifiableCollectionView
Methods inherited from IdentifiableCollectionView
Methods inherited from View
Instance Method Details
#create(content, attributes, identifier, binary: false, filename: nil) ⇒ self
Creates a new item and adds it to the site’s collection of items.
24 25 26 27 28 |
# File 'lib/nanoc/base/views/mutable_item_collection_view.rb', line 24 def create(content, attributes, identifier, binary: false, filename: nil) content = Nanoc::Int::Content.create(content, binary: binary, filename: filename) @objects << Nanoc::Int::Item.new(content, attributes, identifier) self end |