426件ヒット
[401-426件を表示]
(0.132秒)
ライブラリ
- ビルトイン (30)
- json (252)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / ostruct (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / symbol (12) -
json
/ add / time (12)
クラス
- BigDecimal (12)
- Complex (12)
- Date (12)
- DateTime (12)
- Exception (12)
-
JSON
:: Parser (12) -
JSON
:: State (84) - Object (30)
- OpenStruct (12)
- Range (12)
- Rational (12)
- Regexp (12)
- Struct (12)
- Symbol (12)
- Time (12)
モジュール
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (24) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (36)
キーワード
-
allow
_ nan? (12) - configure (12)
- indent= (12)
- j (12)
- jj (12)
- merge (12)
-
object
_ nl= (12) - parse (12)
- space= (12)
-
space
_ before= (12) - then (14)
-
to
_ json (252) -
to
_ json _ raw (12) -
yield
_ self (16)
検索結果
-
Object
# yield _ self {|x| . . . } -> object (3119.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...果を返します。
//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}
値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。
//emlist[メソッドチェインのパ......ri'
require 'json'
construct_url(arguments).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
#......条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Kernel
# j(*objects) -> nil (141.0) -
与えられたオブジェクトを JSON 形式の文字列で標準出力に一行で出力します。
...クトを JSON 形式の文字列で標準出力に一行で出力します。
@param objects JSON 形式で出力したいオブジェクトを指定します。
//emlist[例][ruby]{
require "json"
j([1,2,{"name" => "tanaka","age" => 19}])
# => [1,2,{"name":"tanaka","age":19}]
//}
@see Kernel.#... -
Kernel
# jj(*objects) -> nil (141.0) -
与えられたオブジェクトを JSON 形式の文字列で標準出力に人間に読みやすく整形して出力します。
...られたオブジェクトを JSON 形式の文字列で標準出力に人間に読みやすく整形して出力します。
@param objects JSON 形式で出力したいオブジェクトを指定します。
//emlist[例][ruby]{
require "json"
jj([1,2,{"name" => "tanaka","age" => 19}])
# => [......# 1,
# 2,
# {
# "name": "tanaka",
# "age": 19
# }
# ]
//}
@see Kernel.#pp...