Sha256: f5f85fecdec452602e6c381b9baead6ea1268e9f28f92c198a2cf2bd10c24734
Contents?: true
Size: 451 Bytes
Versions: 3
Compression:
Stored size: 451 Bytes
Contents
# encoding: utf-8 module Nanoc class MutableItemView < Nanoc::ItemView # Sets the value for the given attribute. # # @param [Symbol] key # # @see Hash#[]= def []=(key, value) unwrap[key] = value end # Updates the attributes based on the given hash. # # @param [Hash] hash # # @return [self] def update_attributes(hash) hash.each { |k, v| unwrap[k] = v } self end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nanoc-4.0.0b2 | lib/nanoc/base/views/mutable_item.rb |
nanoc-4.0.0b1 | lib/nanoc/base/views/mutable_item.rb |
nanoc-4.0.0a2 | lib/nanoc/base/views/mutable_item.rb |