instance method
transform_values!
Ruby on Rails 5.2.8.1
Since v4.2.9 Last seen in v5.2.8.1Available in: v4.2.9 v5.2.8.1
Signature
transform_values!()
Destructively converts all values using the block operations. Same as transform_values but modifies self.
Source
# File activesupport/lib/active_support/core_ext/hash/transform_values.rb, line 25
def transform_values!
return enum_for(:transform_values!) { size } unless block_given?
each do |key, value|
self[key] = yield(value)
end
end
Defined in activesupport/lib/active_support/core_ext/hash/transform_values.rb line 25
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Hash