るりまサーチ

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

別のキーワード

  1. erb result
  2. _builtin result
  3. coverage result
  4. coverage peek_result
  5. erb result_with_hash

ライブラリ

モジュール

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

Array#permutation(n = self.length) -> Enumerator (19.0)

サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。

...した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2, 3]
result
= []
a.permutation(2) {|e| result << e} # => [1,2,3]
result
# => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}

@see Array#combination, Array#repeated_permutation...

Array#permutation(n = self.length) { |p| block } -> self (19.0)

サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。

...した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2, 3]
result
= []
a.permutation(2) {|e| result << e} # => [1,2,3]
result
# => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}

@see Array#combination, Array#repeated_permutation...

Array#repeated_combination(n) -> Enumerator (19.0)

サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。

...要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2, 3]
result
= []
a.repeated_combination(3) {|e| result << e} # => [1,2,3]
result
#=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],
# [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
//}

@see...

Array#repeated_combination(n) { |c| ... } -> self (19.0)

サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。

...要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2, 3]
result
= []
a.repeated_combination(3) {|e| result << e} # => [1,2,3]
result
#=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],
# [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
//}

@see...

Array#repeated_permutation(n) -> Enumerator (19.0)

サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。

...各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2]
result
= []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result
#=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}

@see Array#repeated_com...

絞り込み条件を変える

Array#repeated_permutation(n) { |p| ... } -> self (19.0)

サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。

...各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2]
result
= []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result
#=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}

@see Array#repeated_com...

String#[](substr) -> String | nil (19.0)

self が substr を含む場合、一致した文字列を新しく作って返します。 substr を含まなければ nil を返します。

...た文字列を新しく作って返します。
substr を含まなければ nil を返します。

@param substr 取得したい文字列のパターン。文字列

//emlist[例][ruby]{
substr = "bar"
result
= "foobar"[substr]
p result # => "bar"
p substr.equal?(result) # => false
//}...

String#slice(substr) -> String | nil (19.0)

self が substr を含む場合、一致した文字列を新しく作って返します。 substr を含まなければ nil を返します。

...た文字列を新しく作って返します。
substr を含まなければ nil を返します。

@param substr 取得したい文字列のパターン。文字列

//emlist[例][ruby]{
substr = "bar"
result
= "foobar"[substr]
p result # => "bar"
p substr.equal?(result) # => false
//}...

JSON::State#generate(obj) -> String (17.0)

Generates a valid JSON document from object obj and returns the result. If no valid JSON document can be created this method raises a GeneratorError exception.

...Generates a valid JSON document from object obj and returns the
result
. If no valid JSON document can be created this method raises a
GeneratorError exception....
<< < 1 2 3 4 5 ... > >>