Skip to content

Documentation


Documentation / @blazetrails/activesupport / valuesAt

Function: valuesAt() ​

Call Signature ​

valuesAt<T>(hash, ...keys): (T | null)[]

Defined in: packages/ruby-compat/dist/hash.d.ts:393

Ruby Hash#values_at (vendor/ruby/v3.3.11/hash.c:2713 rb_hash_values_at) — an ARRAY of the values for the given keys, in argument order, nil for a key the hash does not hold.

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
hashRecord<string, T> | Map<string, T>
...keysstring[]

Returns ​

(T | null)[]

No Rails Equivalent ​

PERMANENT — Ruby core Hash#values_at (vendor/ruby/v3.3.11/hash.c:2713).

Call Signature ​

valuesAt<K, T>(hash, ...keys): (T | null)[]

Defined in: packages/ruby-compat/dist/hash.d.ts:398

The Map arm: rb_hash_aref is the same lookup whichever hash it is given.

Type Parameters ​

Type Parameter
K
T

Parameters ​

ParameterType
hashMap<K, T>
...keysK[]

Returns ​

(T | null)[]

No Rails Equivalent ​

PERMANENT — Ruby core Hash#values_at (vendor/ruby/v3.3.11/hash.c:2713).