ライブラリ
クラス
- Array (132)
- CSV (24)
- ERB (20)
-
Encoding
:: Converter (12) -
Gem
:: DependencyList (12) -
JSON
:: State (12) - Mutex (2)
- Object (36)
-
OpenSSL
:: SSL :: SSLSocket (12) - StopIteration (12)
- String (144)
-
Thread
:: Mutex (10) -
WIN32OLE
_ PARAM (12)
モジュール
- Enumerable (72)
- FileUtils (24)
キーワード
- === (12)
- [] (72)
-
_ dump (12) - combination (24)
- fetch (36)
-
force
_ quotes? (12) - generate (12)
- inject (36)
-
marshal
_ dump (12) - output? (12)
- permutation (24)
-
primitive
_ errinfo (12) - reduce (36)
-
repeated
_ combination (24) -
repeated
_ permutation (24) -
result
_ with _ hash (8) - ruby (12)
- sh (12)
- slice (72)
-
spec
_ predecessors (12) - synchronize (12)
-
verify
_ result (12) -
write
_ headers? (12)
検索結果
先頭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....