るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

クラス

キーワード

検索結果

<< 1 2 3 > >>

IO#each(limit, chomp: false) -> Enumerator (18249.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...ます。

ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。

テキスト読み込みメソッドとして動作します。

limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途...
...mit 最大の読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例: 引数なし][ruby]{
IO.write("testfi...
...le", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カ...

IO#each(limit, chomp: false) {|line| ... } -> self (18249.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...ます。

ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。

テキスト読み込みメソッドとして動作します。

limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途...
...mit 最大の読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例: 引数なし][ruby]{
IO.write("testfi...
...le", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カ...

IO#each(rs = $/, chomp: false) -> Enumerator (18249.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...ます。

ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。

テキスト読み込みメソッドとして動作します。

limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途...
...mit 最大の読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例: 引数なし][ruby]{
IO.write("testfi...
...le", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カ...

IO#each(rs, limit, chomp: false) -> Enumerator (18249.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...ます。

ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。

テキスト読み込みメソッドとして動作します。

limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途...
...mit 最大の読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例: 引数なし][ruby]{
IO.write("testfi...
...le", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カ...

IO#each(rs, limit, chomp: false) {|line| ... } -> self (18249.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...ます。

ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。

テキスト読み込みメソッドとして動作します。

limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途...
...mit 最大の読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例: 引数なし][ruby]{
IO.write("testfi...
...le", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カ...

絞り込み条件を変える

IO#each(limit) -> Enumerator (18237.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...ます。

ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。

テキスト読み込みメソッドとして動作します。

limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途...
...mit 最大の読み込みバイト数

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例: 引数なし][ruby]{
IO.write("testfile", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each...
..." }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so...

IO#each(limit) {|line| ... } -> self (18237.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...ます。

ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。

テキスト読み込みメソッドとして動作します。

limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途...
...mit 最大の読み込みバイト数

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例: 引数なし][ruby]{
IO.write("testfile", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each...
..." }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so...

IO#each(rs = $/) -> Enumerator (18237.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...ます。

ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。

テキスト読み込みメソッドとして動作します。

limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途...
...mit 最大の読み込みバイト数

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例: 引数なし][ruby]{
IO.write("testfile", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each...
..." }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so...

IO#each(rs, limit) -> Enumerator (18237.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...ます。

ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。

テキスト読み込みメソッドとして動作します。

limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途...
...mit 最大の読み込みバイト数

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例: 引数なし][ruby]{
IO.write("testfile", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each...
..." }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so...

IO#each(rs, limit) {|line| ... } -> self (18237.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...ます。

ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。

テキスト読み込みメソッドとして動作します。

limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途...
...mit 最大の読み込みバイト数

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例: 引数なし][ruby]{
IO.write("testfile", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each...
..." }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so...

絞り込み条件を変える

IO#each_byte -> Enumerator (12215.0)

IO の現在位置から 1 バイトずつ読み込み、それを整数として与え、ブロックを実行します。

...ator オブジェクトを返します。

バイナリ読み込みメソッドとして動作します。

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例][ruby]{
IO.write("testfile", "aあ")
File.open("testfile") do |io|
io.each_byte...

IO#each_byte {|ch| ... } -> self (12215.0)

IO の現在位置から 1 バイトずつ読み込み、それを整数として与え、ブロックを実行します。

...ator オブジェクトを返します。

バイナリ読み込みメソッドとして動作します。

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

//emlist[例][ruby]{
IO.write("testfile", "aあ")
File.open("testfile") do |io|
io.each_byte...

IO#each_codepoint -> Enumerator (12215.0)

IO の各コードポイントに対して繰り返しブロックを呼びだします。

...にはコードポイントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。

//emlist[例][ruby]{
IO.write("testfile", "abcdeあ")
File.open("testfile") do |f|
f.each_codepoint { |i| p i }
end
# => 97
# 98
# 99
# 100
# 101
# 12354
//}...

IO#each_codepoint {|c| ... } -> self (12215.0)

IO の各コードポイントに対して繰り返しブロックを呼びだします。

...にはコードポイントを表す整数が渡されます。

ブロックを省略した場合には、Enumerator を返します。

//emlist[例][ruby]{
IO.write("testfile", "abcdeあ")
File.open("testfile") do |f|
f.each_codepoint { |i| p i }
end
# => 97
# 98
# 99
# 100
# 101
# 12354
//}...
<< 1 2 3 > >>