Sha256: 4c2e99d247b4cb8ceb3f015306d3871810793c61fff8618815c0468a5869f700
Contents?: true
Size: 950 Bytes
Versions: 1
Compression:
Stored size: 950 Bytes
Contents
# encoding: utf-8 module Nanoc class MutableItemCollectionView < Nanoc::MutableIdentifiableCollectionView # @api private def view_class Nanoc::MutableItemView end # Creates a new item and adds it to the site’s collection of items. # # @param [String] content The uncompiled item content (if it is a textual # item) or the path to the filename containing the content (if it is a # binary item). # # @param [Hash] attributes A hash containing this item's attributes. # # @param [Nanoc::Identifier, String] identifier This item's identifier. # # @param [Hash] params Extra parameters. # # @option params [Symbol, nil] :binary (true) Whether or not this item is # binary # # @return [self] def create(content, attributes, identifier, params = {}) @objects << Nanoc::Int::Item.new(content, attributes, identifier, params) self end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nanoc-4.0.0b2 | lib/nanoc/base/views/mutable_item_collection.rb |