別のキーワード
種類
- インスタンスメソッド (404)
- 特異メソッド (204)
- 文書 (60)
- モジュール関数 (19)
- クラス (11)
ライブラリ
クラス
- Array (85)
- CSV (121)
- IO (11)
-
Net
:: HTTP (11) -
Net
:: POPMail (99) -
Net
:: SMTP (22) - OptionParser (33)
-
REXML
:: Document (22) -
REXML
:: Element (11) -
REXML
:: Formatters :: Default (11) -
Rake
:: Application (11) -
Rake
:: MakefileLoader (11) - String (11)
- StringIO (55)
-
Zlib
:: Deflate (22) -
Zlib
:: GzipWriter (11) -
Zlib
:: Inflate (11)
モジュール
-
OpenSSL
:: Buffering (11) - Psych (39)
- Timeout (19)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - CSV (11)
-
NEWS for Ruby 2
. 7 . 0 (5) -
add
_ loader (11) - all (33)
-
debug
_ output= (11) - filter (33)
- load (11)
-
load
_ stream (22) - mail (33)
- new (22)
- open (66)
- pack (19)
- pack テンプレート文字列 (11)
- parse (22)
- permutation (22)
- pop (33)
- pos= (11)
- read (11)
- readlines (11)
- readpartial (11)
-
repeated
_ combination (22) -
repeated
_ permutation (22) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
safe
_ load (17) - separator (11)
-
set
_ debug _ output (22) -
set
_ dictionary (22) - string (11)
- summarize (22)
- timeout (19)
- unpack (11)
- write (44)
検索結果
先頭5件
-
IO
# readpartial(maxlen , outbuf = "") -> String (27182.0) -
IO から長さ maxlen を上限として読み込み、文字列として返します。 即座に得られるデータが存在しないときにはブロックしてデータの到着を待ちます。 即座に得られるデータが 1byte でも存在すればブロックしません。
...
IO から長さ maxlen を上限として読み込み、文字列として返します。
即座に得られるデータが存在しないときにはブロックしてデータの到着を待ちます。
即座に得られるデータが 1byte でも存在すればブロックしません。
バ......dpartial はブロックを最小限に抑えることによって、
パイプ、ソケット、端末などのストリームに対して適切に動作するよう設計されています。
readpartial がブロックするのは次の全ての条件が満たされたときだけです。
* IO......ては次のように動作します。
r, w = IO.pipe # buffer pipe content
w << "abc" # "" "abc".
r.readpartial(4096) #=> "abc" "" ""
r.readpartial(4096) # バッファにもパイプに... -
Zlib
:: GzipWriter # <<(str) -> self (21118.0) -
str を出力します。str が文字列でない場合は to_s を用いて 文字列に変換します。
...。
@param str 出力したいオブジェクトを与えます。
require 'zlib'
filename='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz << "hoge" << "fuga"
}
fr = File.open(filename)
Zlib::GzipReader.wrap(fr){|gz|
puts gz.......read
}
#=> hogefuga
@see IO#<<... -
OpenSSL
:: Buffering # <<(s) -> self (21106.0) -
文字列 s を書き込みます。
...文字列 s を書き込みます。
IO#<< と同様です。
@param s 出力する文字列... -
Array
# repeated _ permutation(n) -> Enumerator (18307.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......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 perm......utation of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して 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... -
Array
# repeated _ permutation(n) { |p| . . . } -> self (18307.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......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 perm......utation of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して 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... -
Array
# permutation(n = self . length) -> Enumerator (12207.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......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 #=> [[]]: one per......ngth 0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e} # =>... -
Array
# permutation(n = self . length) { |p| block } -> self (12207.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......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 #=> [[]]: one per......ngth 0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e} # =>... -
Array
# repeated _ combination(n) -> Enumerator (12206.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...ブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......epeated_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.repeated_combinatio......peated_combination(0).to_a #=> [[]] # one combination of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.repeated_combination(3) {|e| result <<... -
Array
# repeated _ combination(n) { |c| . . . } -> self (12206.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...ブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙......epeated_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.repeated_combinatio......peated_combination(0).to_a #=> [[]] # one combination of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.repeated_combination(3) {|e| result <<... -
OptionParser
# separator(sep) -> () (9106.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...サマリにオプションを区切るための文字列 sep を挿入します。
オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
サマリには on メソッドを呼んだ順にオプションが表示されるので、区切りを挿......@param sep サマリの区切りを文字列で指定します。
//emlist[][ruby]{
require 'optparse'
opts = OptionParser.new
opts.banner = "Usage: example.rb [options]"
opts.separator ""
opts.separator "Specific options:"
opts.on("-r", "--require LIBRARY") do |lib|
options.library << l......ib
end
opts.separator ""
opts.separator "Common options:"
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
//}...