るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
4件ヒット [1-4件を表示] (0.181秒)

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

クラス

キーワード

検索結果

JSON::State#to_hash -> Hash (54343.0)

自身をハッシュに変換します。

自身をハッシュに変換します。

//emlist[例][ruby]{
require "json"
require "pp"

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# ...

SDBM#replace(other) -> self (18376.0)

self の内容を other の内容で置き換えます。

self の内容を other の内容で置き換えます。

@param other each_pair メソッドを持つオブジェクトでなければなりません。

require 'sdbm'

db1 = SDBM.open('aaa.gdbm', 0666)
db1['a'] = 'aaa'
db1['b'] = 'bbb'
db1['c'] = 'ccc'
db2 = SDBM.open('bbb.gdbm', 0666)
db2['c'] = 'ccc'
db2['d'] = 'ddd'
hash = { 'x' => 'xxx', 'y' => 'y...

SDBM#update(other) -> self (18376.0)

self と other の内容をマージします。

self と other の内容をマージします。

重複するキーに対応する値はother の内容で上書きされます。

@param other each_pair メソッドを持つオブジェクトでなければなりません。

require 'sdbm'

db1 = SDBM.open('aaa.gdbm', 0666)
db1.clear
db1['a'] = 'aaa'
db1['b'] = 'bbb'
db1['c'] = 'ccc'
db2 = SDBM.open('bbb.gdbm', 0666)
db2.clear
db2['c'] = 'ccc'...

JSON::State#to_h -> Hash (9043.0)

自身をハッシュに変換します。

自身をハッシュに変換します。

//emlist[例][ruby]{
require "json"
require "pp"

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# ...