1件ヒット
[1-1件を表示]
(0.258秒)
ライブラリ
- ビルトイン (1)
検索結果
-
Hash
# to _ h -> self | Hash (105976.0) -
self を返します。Hash クラスのサブクラスから呼び出した場合は self を Hash オブジェクトに変換します。
...す。Hash クラスのサブクラスから呼び出した場合は
self を Hash オブジェクトに変換します。
//emlist[例][ruby]{
hash = {}
p hash.to_h # => {}
p hash.to_h == hash # => true
class MyHash < Hash;end
my_hash = MyHash.new
p my_hash.to_h # => {}
p my_hash.clas......s # => MyHash
p my_hash.to_h.class # => Hash
//}...