るりまサーチ

最速Rubyリファレンスマニュアル検索!
412件ヒット [1-100件を表示] (0.235秒)

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n=
  3. rsa n
  4. openssl n
  5. pop n_mails

ライブラリ

クラス

モジュール

検索結果

<< 1 2 3 ... > >>

StopIteration#result -> object (24108.0)

この例外オブジェクトを発生させる原因となったメソッド等の返り値を返します。

...ect = Object.new
def object.each
yield :yield1
yield :yield2
:each_returned
end

enumerator = object.to_enum

p enumerator.next #=> :yield1
p enumerator.next #=> :yield2

begin
enumerator.next
rescue StopIteration => error
p error.result #=> :each_returned
end...

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

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

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

得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、
組み合わせを生成する Enumerator オブジェクトを返し...
...ます。

@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えな...
...{
a
= [1, 2, 3]
a
.repeated_combination(1).to_a #=> [[1], [2], [3]]
a
.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a
.repeated_combination(3).to_a #=> [[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]]
a
....

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

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

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

得られる順列の順序は保証されません。ブロックなしで呼び出されると, 順列
を生成する Enumerator オブジェクトを返します。

@param n 生成...
...to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
a
= [1, 2]
a
.repeated_permutation(1).to_a #=>...
...[[1], [2]]
a
.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a
.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a
.repeated_permutation(0).to_a #=> [[]] # one permutation of length 0
//}

ブロッ...

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

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

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

得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、
組み合わせを生成する Enumerator オブジェクトを返し...
...ます。

@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えな...
...{
a
= [1, 2, 3]
a
.repeated_combination(1).to_a #=> [[1], [2], [3]]
a
.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a
.repeated_combination(3).to_a #=> [[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]]
a
....

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

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

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

得られる順列の順序は保証されません。ブロックなしで呼び出されると, 順列
を生成する Enumerator オブジェクトを返します。

@param n 生成...
...to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
a
= [1, 2]
a
.repeated_permutation(1).to_a #=>...
...[[1], [2]]
a
.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a
.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a
.repeated_permutation(0).to_a #=> [[]] # one permutation of length 0
//}

ブロッ...

絞り込み条件を変える

JSON::State#generate(obj) -> String (15249.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....

Array#combination(n) -> Enumerator (12433.0)

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

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

得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、組み合わせ
を生成する Enumerator オブジェクトを返します。

@param...
...to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
a
= [1, 2, 3, 4]
a
.combination(1).to_a #=> [[...
...,[3],[4]]
a
.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a
.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a
.combination(4).to_a #=> [[1,2,3,4]]
a
.combination(0).to_a #=> [[]]: one combination of length 0
a
.combination(5).to_a #=> [] : no combinations of length 5
//}...

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

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

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

引数を省略した場合は配列の要素数と同じサイズの順列に対してブロックを実
行します。

得られる順列の順序は保証されません。ブロックなし...
...を生成する Enumerator オブジェクトを返します。

@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引...
...]{
a
= [1, 2, 3]
a
.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a
.permutation(1).to_a #=> [[1],[2],[3]]
a
.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a
.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a
.permutation(0).to_a...

ERB#result_with_hash(hash) -> String (12408.0)

ERB をハッシュオブジェクトで指定されたローカル変数を持つ 新しいトップレベルバインディングで実行し、結果の文字列を返します。

...ERB をハッシュオブジェクトで指定されたローカル変数を持つ
新しいトップレベルバインディングで実行し、結果の文字列を返します。

@param hash ローカル変数名をキーにしたハッシュ

@see ERB#result...

Array#combination(n) {|c| block } -> self (12333.0)

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

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

得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、組み合わせ
を生成する Enumerator オブジェクトを返します。

@param...
...to_int メソッドによる暗
黙の型変換を試みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
a
= [1, 2, 3, 4]
a
.combination(1).to_a #=> [[...
...,[3],[4]]
a
.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a
.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a
.combination(4).to_a #=> [[1,2,3,4]]
a
.combination(0).to_a #=> [[]]: one combination of length 0
a
.combination(5).to_a #=> [] : no combinations of length 5
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>