Method: Origami::CompoundObject#update_values!

Defined in:
lib/origami/compound.rb

#update_values!(&b) ⇒ Object

Modifies the compound object’s values based on the provided block.

Raises:

  • (NotImplementedError)


138
139
140
141
142
143
144
# File 'lib/origami/compound.rb', line 138

def update_values!(&b)
    return enum_for(__method__) unless block_given?
    return self.transform_values!(&b) if self.respond_to?(:transform_values!)
    return self.map!(&b) if self.respond_to?(:map!)

    raise NotImplementedError, "This object does not implement this method"
end