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
| Parameter | Type |
|---|---|
hash | Record<string, T> | Map<string, T> |
...keys | string[] |
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
| Parameter | Type |
|---|---|
hash | Map<K, T> |
...keys | K[] |
Returns
(T | null)[]
No Rails Equivalent
PERMANENT — Ruby core Hash#values_at (vendor/ruby/v3.3.11/hash.c:2713).