ライブラリ
- ビルトイン (4)
-
rexml
/ document (2) -
rubygems
/ indexer (1)
クラス
- Array (2)
-
Gem
:: Indexer (1) - Hash (2)
-
REXML
:: Formatters :: Pretty (2)
キーワード
- compact! (2)
- compact= (1)
-
compact
_ specs (1)
検索結果
先頭5件
-
Hash
# compact -> Hash (72850.0) -
compact は自身から value が nil のもの取り除いた Hash を生成して返します。 compact! は自身から破壊的に value が nil のものを取り除き、変更が行われた場合は self を、そうでなければ nil を返します。
compact は自身から value が nil のもの取り除いた Hash を生成して返します。 compact! は自身から破壊的に value が nil のものを取り除き、変更が行われた場合は self を、そうでなければ nil を返します。
//emlist[例][ruby]{
hash = {a: 1, b: nil, c: 3}
p hash.compact #=> {:a=>1, :c=>3}
p hash #=> {:a=>1, :b=>nil, :c=>3}
hash.compact!
hash #=> {:a=>1, :... -
Array
# compact -> Array (72760.0) -
compact は自身から nil を取り除いた配列を生成して返します。 compact! は自身から破壊的に nil を取り除き、変更が 行われた場合は self を、そうでなければ nil を返します。
compact は自身から nil を取り除いた配列を生成して返します。
compact! は自身から破壊的に nil を取り除き、変更が
行われた場合は self を、そうでなければ nil を返します。
//emlist[例][ruby]{
ary = [1, nil, 2, nil, 3, nil]
p ary.compact #=> [1, 2, 3]
p ary #=> [1, nil, 2, nil, 3, nil]
ary.compact!
p ary #=> [1, 2, 3]
p ary.compact! #=> nil
//... -
REXML
:: Formatters :: Pretty # compact -> bool (72625.0) -
出力をコンパクトにするかどうかを返します。
出力をコンパクトにするかどうかを返します。
これが真の場合、出力の空白をできる限り削除しようとします。
デフォルト値は false です。
@see REXML::Formatters::Pretty#compact= -
Hash
# compact! -> self | nil (36850.0) -
compact は自身から value が nil のもの取り除いた Hash を生成して返します。 compact! は自身から破壊的に value が nil のものを取り除き、変更が行われた場合は self を、そうでなければ nil を返します。
compact は自身から value が nil のもの取り除いた Hash を生成して返します。 compact! は自身から破壊的に value が nil のものを取り除き、変更が行われた場合は self を、そうでなければ nil を返します。
//emlist[例][ruby]{
hash = {a: 1, b: nil, c: 3}
p hash.compact #=> {:a=>1, :c=>3}
p hash #=> {:a=>1, :b=>nil, :c=>3}
hash.compact!
hash #=> {:a=>1, :... -
Array
# compact! -> self | nil (36760.0) -
compact は自身から nil を取り除いた配列を生成して返します。 compact! は自身から破壊的に nil を取り除き、変更が 行われた場合は self を、そうでなければ nil を返します。
compact は自身から nil を取り除いた配列を生成して返します。
compact! は自身から破壊的に nil を取り除き、変更が
行われた場合は self を、そうでなければ nil を返します。
//emlist[例][ruby]{
ary = [1, nil, 2, nil, 3, nil]
p ary.compact #=> [1, 2, 3]
p ary #=> [1, nil, 2, nil, 3, nil]
ary.compact!
p ary #=> [1, 2, 3]
p ary.compact! #=> nil
//... -
REXML
:: Formatters :: Pretty # compact=(c) (36625.0) -
出力をコンパクトにするかどうかを設定します。
出力をコンパクトにするかどうかを設定します。
@param c コンパクトな出力をするかどうかを指定します。
@see REXML::Formatters::Pretty#compact -
Gem
:: Indexer # compact _ specs(specs) -> Array (36607.0) -
与えられたスペックを元にスペックを一意に特定できるだけの情報を持った配列を作成して 返します。
与えられたスペックを元にスペックを一意に特定できるだけの情報を持った配列を作成して
返します。
@param specs Gem::Specification の配列を指定します。