method
values_at
v7.0.0 -
Show latest stable
- Class:
ActiveSupport::HashWithIndifferentAccess
values_at(*keys)public
Returns an array of the values at the specified indices:
hash = ActiveSupport::HashWithIndifferentAccess.new hash[:a] = 'x' hash[:b] = 'y' hash.values_at('a', 'b') # => ["x", "y"]