るりまサーチ

最速Rubyリファレンスマニュアル検索!
121件ヒット [1-100件を表示] (0.080秒)
トップページ > クエリ:-[x] > クエリ:on[x] > クエリ:to_h[x]

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. thread abort_on_exception=
  5. thread abort_on_exception

ライブラリ

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 > >>

JSON::State#to_h -> Hash (21207.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,
# :de...

OpenSSL::X509::Extension#to_h -> Hash (21201.0)

拡張領域の内容を、 { "oid" => 識別子(extnID), "value" => 値(extnValue), "critical" => 重要度(critical) } というハッシュで返します。

拡張領域の内容を、
{ "oid" => 識別子(extnID), "value" => 値(extnValue), "critical" => 重要度(critical) }
というハッシュで返します。

Socket::Constants::IPPROTO_HOPOPTS -> Integer (9232.0)

IPv6 hop-by-hop options。 BasicSocket#getsockopt, BasicSocket#setsockopt の level 引数に使用します。

...IPv6 hop-by-hop options。
BasicSocket#getsockopt, BasicSocket#setsockopt の
level 引数に使用します。

また、Socket.open の protocol 引数に渡す利用法もあります。

@see 2292...

JSON::State#to_hash -> Hash (9207.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,
# :de...

Socket::Constants::IPPROTO_HELLO -> Integer (9200.0)

@todo "hello" routing protocol。 BasicSocket#getsockopt, BasicSocket#setsockopt の level 引数に使用します。

@todo
"hello" routing protocol。
BasicSocket#getsockopt, BasicSocket#setsockopt の
level 引数に使用します。

また、Socket.open の protocol 引数に渡す利用法もあります。

絞り込み条件を変える

ENV.clone(freeze: true) -> object (6212.0)

ENV オブジェクトの複製を作成して返します。

...3.1 からは複製で環境変数を操作するときに deprecated 警告がでます。

テスト実行中に環境変数を退避する用途には ENV.to_h を使用してください。

//emlist[][ruby]{
saved_env = ENV.to_h
# (テストなど)
ENV.replace(saved_env)
//}

@see Object#clone...
...複製で環境変数を操作するときに deprecated 警告がでます。

テスト実行中に環境変数を退避する用途には ENV.to_h を使用してください。

//emlist[][ruby]{
saved_env = ENV.to_h
# (テストなど)
ENV.replace(saved_env)
//}

@see Object#clone
@see ENV.dup...

JSON.#pretty_generate(object, options = nil) -> String (3206.0)

Ruby のオブジェクトを JSON 形式の文字列に変換して返します。

...Ruby のオブジェクトを JSON 形式の文字列に変換して返します。

このメソッドは JSON.#generate よりも人間に読みやすい文字列を返します。

pretty_unparse は将来削除される予定です。

@param object JSON 形式の文字列に変換するオブ...
...m options JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定できます。
ハッシュを使用する場合指定可能なオプションは JSON.#generate を参照してください。

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

has...
..."tanaka", "age": 19 }
puts JSON.generate(hash)
# => {"name":"tanaka","age":19}

puts JSON.pretty_generate(hash)
# => {
# "name": "tanaka",
# "age": 19
# }

puts JSON.pretty_generate(hash, space: "\t")
# => {
# "name": "tanaka",
# "age": 19
# }
//}

@see JSON.#generate...

JSON.#pretty_unparse(object, options = nil) -> String (3206.0)

Ruby のオブジェクトを JSON 形式の文字列に変換して返します。

...Ruby のオブジェクトを JSON 形式の文字列に変換して返します。

このメソッドは JSON.#generate よりも人間に読みやすい文字列を返します。

pretty_unparse は将来削除される予定です。

@param object JSON 形式の文字列に変換するオブ...
...m options JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定できます。
ハッシュを使用する場合指定可能なオプションは JSON.#generate を参照してください。

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

has...
..."tanaka", "age": 19 }
puts JSON.generate(hash)
# => {"name":"tanaka","age":19}

puts JSON.pretty_generate(hash)
# => {
# "name": "tanaka",
# "age": 19
# }

puts JSON.pretty_generate(hash, space: "\t")
# => {
# "name": "tanaka",
# "age": 19
# }
//}

@see JSON.#generate...

JSON.#generate(object, state = nil) -> String (3106.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...オブジェクトを一行の JSON 形式の文字列に変換して返します。

デフォルトでは、サイズが最小となる JSON 形式の文字列を生成します。
また、循環参照のチェックを行います。JSON::NaN, JSON::Infinity,
JSON::MinusInfinity を生成する...
...ありません。

unparse は将来削除される予定です。

@param object JSON 形式の文字列に変換するオブジェクトを指定します。

@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定できます...
...ring that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default: '')
: :check_circular
真を指定した場合、生成するオブジェクトの循環を...

JSON.#unparse(object, state = nil) -> String (3106.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...オブジェクトを一行の JSON 形式の文字列に変換して返します。

デフォルトでは、サイズが最小となる JSON 形式の文字列を生成します。
また、循環参照のチェックを行います。JSON::NaN, JSON::Infinity,
JSON::MinusInfinity を生成する...
...ありません。

unparse は将来削除される予定です。

@param object JSON 形式の文字列に変換するオブジェクトを指定します。

@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定できます...
...ring that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default: '')
: :check_circular
真を指定した場合、生成するオブジェクトの循環を...

絞り込み条件を変える

<< 1 2 > >>