lib/nanoc/base/repos/data_source.rb in nanoc-4.1.6 vs lib/nanoc/base/repos/data_source.rb in nanoc-4.2.0b1

- old
+ new

@@ -128,32 +128,36 @@ end # Creates a new in-memory item instance. This is intended for use within # the {#items} method. # - # @param [String] content The uncompiled item content + # @param [String, Proc] 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 [Hash, Proc] attributes A hash containing this item's attributes. # # @param [String] identifier This item's identifier. # # @param [Boolean] binary Whether or not this item is binary - def new_item(content, attributes, identifier, binary: false) + # + # @param [String, nil] checksum_data Used to determine whether the item has changed + def new_item(content, attributes, identifier, binary: false, checksum_data: nil) content = Nanoc::Int::Content.create(content, binary: binary) - Nanoc::Int::Item.new(content, attributes, identifier) + Nanoc::Int::Item.new(content, attributes, identifier, checksum_data: checksum_data) end # Creates a new in-memory layout instance. This is intended for use within # the {#layouts} method. # # @param [String] raw_content The raw content of this layout. # # @param [Hash] attributes A hash containing this layout's attributes. # # @param [String] identifier This layout's identifier. - def new_layout(raw_content, attributes, identifier) - Nanoc::Int::Layout.new(raw_content, attributes, identifier) + # + # @param [String, nil] checksum_data Used to determine whether the layout has changed + def new_layout(raw_content, attributes, identifier, checksum_data: nil) + Nanoc::Int::Layout.new(raw_content, attributes, identifier, checksum_data: checksum_data) end end end