るりまサーチ

最速Rubyリファレンスマニュアル検索!
17件ヒット [1-17件を表示] (0.043秒)
トップページ > ライブラリ:ビルトイン[x] > クエリ:to_sym[x] > クラス:Hash[x]

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

検索結果

Hash#transform_keys! -> Enumerator (9.0)

すべてのキーに対してブロックを呼び出した結果でハッシュのキーを変更します。 値は変化しません。

...# => {"a"=>1, "b"=>2, "c"=>3}
h.transform_keys!(&:to_sym) # => {:a=>1, :b=>2, :c=>3}
h.transform_keys!.with_index {|k, i| "#{k}.#{i}" }
# => {"a.0"=>1, "b.1"=>2, "c.2"=>3}
//}

@see Hash#transform_keys
@see Hash#transform_values
@see Hash#transform_values!...
...すべてのキーに対してブロックを呼び出した結果でハッシュのキーを変更します。
値は変化しません。

@param hash 置き換え前のキーから置き換え後のキーへのハッシュを指定します。
@return transform_keys! は常に self を返しま...
...s!(&:to_sym) # => {:a=>1, :b=>2, :c=>3}
h.transform_keys!(a: "a", d: "d") # => {"a"=>1, :b=>2, :c=>3}
h.transform_keys!.with_index {|k, i| "#{k}.#{i}" }
# => {"a.0"=>1, "b.1"=>2, "c.2"=>3}
//}

@see Hash#transform_keys
@see Hash#transform_values
@see Hash#tran...

Hash#transform_keys! {|key| ... } -> self (9.0)

すべてのキーに対してブロックを呼び出した結果でハッシュのキーを変更します。 値は変化しません。

...# => {"a"=>1, "b"=>2, "c"=>3}
h.transform_keys!(&:to_sym) # => {:a=>1, :b=>2, :c=>3}
h.transform_keys!.with_index {|k, i| "#{k}.#{i}" }
# => {"a.0"=>1, "b.1"=>2, "c.2"=>3}
//}

@see Hash#transform_keys
@see Hash#transform_values
@see Hash#transform_values!...
...すべてのキーに対してブロックを呼び出した結果でハッシュのキーを変更します。
値は変化しません。

@param hash 置き換え前のキーから置き換え後のキーへのハッシュを指定します。
@return transform_keys! は常に self を返しま...
...s!(&:to_sym) # => {:a=>1, :b=>2, :c=>3}
h.transform_keys!(a: "a", d: "d") # => {"a"=>1, :b=>2, :c=>3}
h.transform_keys!.with_index {|k, i| "#{k}.#{i}" }
# => {"a.0"=>1, "b.1"=>2, "c.2"=>3}
//}

@see Hash#transform_keys
@see Hash#transform_values
@see Hash#tran...

Hash#transform_keys!(hash) -> self (9.0)

すべてのキーに対してブロックを呼び出した結果でハッシュのキーを変更します。 値は変化しません。

...すべてのキーに対してブロックを呼び出した結果でハッシュのキーを変更します。
値は変化しません。

@param hash 置き換え前のキーから置き換え後のキーへのハッシュを指定します。
@return transform_keys! は常に self を返しま...
...s!(&:to_sym) # => {:a=>1, :b=>2, :c=>3}
h.transform_keys!(a: "a", d: "d") # => {"a"=>1, :b=>2, :c=>3}
h.transform_keys!.with_index {|k, i| "#{k}.#{i}" }
# => {"a.0"=>1, "b.1"=>2, "c.2"=>3}
//}

@see Hash#transform_keys
@see Hash#transform_values
@see Hash#tran...