instance method
values_at
Ruby on Rails 3.2.22.5
Since v2.2.3 Last seen in v4.2.9Signature
values_at(*indices)
Returns an array of the values at the specified indices:
hash = HashWithIndifferentAccess.new hash[:a] = "x" hash[:b] = "y" hash.values_at("a", "b") # => ["x", "y"]
Parameters
-
indicesrest
Source
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 118
def values_at(*indices)
indices.collect {|key| self[convert_key(key)]}
end
Defined in activesupport/lib/active_support/hash_with_indifferent_access.rb line 118
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in HashWithIndifferentAccess