Sha256: 4319011915b7fcc5ecfe273f4be8105bfc5ab451e485663915e0c7b2117f1054
Contents?: true
Size: 698 Bytes
Versions: 12
Compression:
Stored size: 698 Bytes
Contents
# frozen_string_literal: true module Nanoc class MutableLayoutCollectionView < Nanoc::MutableIdentifiableCollectionView # @api private def view_class Nanoc::MutableLayoutView end # Creates a new layout and adds it to the site’s collection of layouts. # # @param [String] content The layout content. # # @param [Hash] attributes A hash containing this layout's attributes. # # @param [Nanoc::Core::Identifier, String] identifier This layout's identifier. # # @return [self] def create(content, attributes, identifier) @objects = @objects.add(Nanoc::Core::Layout.new(content, attributes, identifier)) self end end end
Version data entries
12 entries across 12 versions & 1 rubygems