135件ヒット
[1-100件を表示]
(0.042秒)
種類
- インスタンスメソッド (80)
- 文書 (31)
- モジュール関数 (24)
クラス
- Array (28)
-
JSON
:: State (24)
モジュール
- Enumerable (28)
- JSON (24)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 6 . 0 (7) - collect (28)
- generate (12)
- map (28)
-
to
_ hash (12) - unparse (12)
検索結果
先頭5件
-
Array
# collect {|item| . . . } -> [object] (21108.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
...してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にする
p [1, 2, 3].map {|n| n * 3 } # => [3, 6, 9]
//}
@see Hash#to_h, Enumerable#collect, Enumerable#map... -
Array
# map {|item| . . . } -> [object] (21108.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
...してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にする
p [1, 2, 3].map {|n| n * 3 } # => [3, 6, 9]
//}
@see Hash#to_h, Enumerable#collect, Enumerable#map... -
Array
# collect -> Enumerator (21008.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
...してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にする
p [1, 2, 3].map {|n| n * 3 } # => [3, 6, 9]
//}
@see Hash#to_h, Enumerable#collect, Enumerable#map... -
Array
# map -> Enumerator (21008.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
...してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にする
p [1, 2, 3].map {|n| n * 3 } # => [3, 6, 9]
//}
@see Hash#to_h, Enumerable#collect, Enumerable#map... -
JSON
:: State # to _ h -> Hash (18119.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,
# :depth=>0... -
JSON
:: State # to _ hash -> Hash (6119.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,
# :depth=>0... -
NEWS for Ruby 2
. 0 . 0 (150.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...のメソッドに対応します
* Array
* 追加: Array#bsearch 二分探索します
* 非互換:
* Array#shuffle! と Array#sample の random パラメータには最大値のみを指定することが可能になりました
* Array#values_at に Range オブジェクト......の引数を一つ受け取るようになりました
* 新規クラス: Enumerator::Lazy 遅延列挙用のクラス
* ENV
* ENV.to_h は ENV.to_hash へのエイリアスです
* Fiber
* 非互換: Fiber#resume は Fiber#transfer を呼び出したファイバーを再開でき......た
* 拡張: Kernel.#caller 第2引数で取得するスタックのサイズを指定できるようになりました
* 拡張: Object#to_enum Object#enum_for サイズの遅延評価のためにブロックを受け取るようになりました
* 非互換: Kernel.#system, Kernel.#e... -
JSON
. # generate(object , state = nil) -> String (138.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...もありません。
unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定できま......: :space_before
a string 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 (138.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...もありません。
unparse は将来削除される予定です。
@param object JSON 形式の文字列に変換するオブジェクトを指定します。
@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定できま......: :space_before
a string 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
真を指定した場合、生成するオブ... -
NEWS for Ruby 2
. 6 . 0 (126.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...s がブロック引数にも反映されるようになりました。 14223
* Refinements が Object#public_send にも反映されるようになりました。 15326
* Refinements が Object#respond_to? にも反映されるようになりました。 15327
* rescue 節なしの else......新
* Array
* 新規メソッド
* Array#union と Array#difference 14097
* 変更されたメソッド
* Array#to_h はブロックを受け取りキーと値のペアを新しいキーと値に変換できるようになりました。 15143
* 別名
* Array#filter......が Array#select の別名として追加されました。 13784
* Array#filter! が Array#select! の別名として追加されました。 13784
* Binding
* 新規メソッド
* Binding#source_location 追加 14230
* bindingのソースコード上の位置を __FILE_... -
Enumerable
# collect {|item| . . . } -> [object] (120.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
...配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}
@see Hash#to_h, Array#collect, Array#map...