検索結果
先頭5件
-
IO
# gets(limit) -> String | nil (26125.0) -
一行読み込んで、読み込みに成功した時にはその文字列を返します。 EOF に到達した時には nil を返します。
...il を返します。
テキスト読み込みメソッドとして動作します。
読み込んだ文字列を変数 $_ にセットします。
IO#readline との違いは EOF での振る舞いのみです。
limit で最大の読み込みバイト数を指定します。ただし
ファイ......みバイト数
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
f = File.new("oneline_file")
f.gets #=> "This is line one\n"
$_ #=> "This is line one\n"
f.gets......#=> nil
$_ #=> nil
@see $/, IO#readline... -
IO
# gets(limit , chomp: false) -> String | nil (26125.0) -
一行読み込んで、読み込みに成功した時にはその文字列を返します。 EOF に到達した時には nil を返します。
...il を返します。
テキスト読み込みメソッドとして動作します。
読み込んだ文字列を変数 $_ にセットします。
IO#readline との違いは EOF での振る舞いのみです。
limit で最大の読み込みバイト数を指定します。ただし
ファイ......除きます。
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
f = File.new("oneline_file")
f.gets #=> "This is line one\n"
$_ #=> "This is line one\n"
f.gets......#=> nil
$_ #=> nil
@see $/, IO#readline... -
IO
# gets(rs = $ / ) -> String | nil (26125.0) -
一行読み込んで、読み込みに成功した時にはその文字列を返します。 EOF に到達した時には nil を返します。
...il を返します。
テキスト読み込みメソッドとして動作します。
読み込んだ文字列を変数 $_ にセットします。
IO#readline との違いは EOF での振る舞いのみです。
limit で最大の読み込みバイト数を指定します。ただし
ファイ......みバイト数
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
f = File.new("oneline_file")
f.gets #=> "This is line one\n"
$_ #=> "This is line one\n"
f.gets......#=> nil
$_ #=> nil
@see $/, IO#readline... -
IO
# gets(rs = $ / , chomp: false) -> String | nil (26125.0) -
一行読み込んで、読み込みに成功した時にはその文字列を返します。 EOF に到達した時には nil を返します。
...il を返します。
テキスト読み込みメソッドとして動作します。
読み込んだ文字列を変数 $_ にセットします。
IO#readline との違いは EOF での振る舞いのみです。
limit で最大の読み込みバイト数を指定します。ただし
ファイ......除きます。
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
f = File.new("oneline_file")
f.gets #=> "This is line one\n"
$_ #=> "This is line one\n"
f.gets......#=> nil
$_ #=> nil
@see $/, IO#readline... -
IO
# gets(rs , limit) -> String | nil (26125.0) -
一行読み込んで、読み込みに成功した時にはその文字列を返します。 EOF に到達した時には nil を返します。
...il を返します。
テキスト読み込みメソッドとして動作します。
読み込んだ文字列を変数 $_ にセットします。
IO#readline との違いは EOF での振る舞いのみです。
limit で最大の読み込みバイト数を指定します。ただし
ファイ......みバイト数
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
f = File.new("oneline_file")
f.gets #=> "This is line one\n"
$_ #=> "This is line one\n"
f.gets......#=> nil
$_ #=> nil
@see $/, IO#readline... -
IO
# gets(rs , limit , chomp: false) -> String | nil (26125.0) -
一行読み込んで、読み込みに成功した時にはその文字列を返します。 EOF に到達した時には nil を返します。
...il を返します。
テキスト読み込みメソッドとして動作します。
読み込んだ文字列を変数 $_ にセットします。
IO#readline との違いは EOF での振る舞いのみです。
limit で最大の読み込みバイト数を指定します。ただし
ファイ......除きます。
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
f = File.new("oneline_file")
f.gets #=> "This is line one\n"
$_ #=> "This is line one\n"
f.gets......#=> nil
$_ #=> nil
@see $/, IO#readline... -
IO
# lineno -> Integer (8054.0) -
現在の行番号を整数で返します。実際には IO#gets が呼ばれた回数です。 改行以外のセパレータで gets が呼ばれた場合など、実際の行番号と異なる場合があります。
...。実際には IO#gets が呼ばれた回数です。
改行以外のセパレータで gets が呼ばれた場合など、実際の行番号と異なる場合があります。
@raise IOError 読み込み用にオープンされていなければ発生します。
f = File.new("testfile")
f.......lineno #=> 0
f.gets #=> "This is line one\n"
f.lineno #=> 1
f.gets #=> "This is line two\n"
f.lineno #=> 2
@see $.... -
IO
# each(limit , chomp: false) -> Enumerator (8028.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として
与えられたブロックを実行します。
ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。
テキスト読み込みメソ......を取り除きます。
@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 { |line| p "......ist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so on...")
f = File.new("testfile")
f.each(",", 10) { |line| p "#{f.lineno}: #{line}" }
# => "0: This is li"
# "1: ne one... -
IO
# each(limit , chomp: false) {|line| . . . } -> self (8028.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として
与えられたブロックを実行します。
ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。
テキスト読み込みメソ......を取り除きます。
@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 { |line| p "......ist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so on...")
f = File.new("testfile")
f.each(",", 10) { |line| p "#{f.lineno}: #{line}" }
# => "0: This is li"
# "1: ne one... -
IO
# each(rs = $ / , chomp: false) -> Enumerator (8028.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として
与えられたブロックを実行します。
ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。
テキスト読み込みメソ......を取り除きます。
@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 { |line| p "......ist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so on...")
f = File.new("testfile")
f.each(",", 10) { |line| p "#{f.lineno}: #{line}" }
# => "0: This is li"
# "1: ne one... -
IO
# each(rs = $ / , chomp: false) {|line| . . . } -> self (8028.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として
与えられたブロックを実行します。
ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。
テキスト読み込みメソ......を取り除きます。
@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 { |line| p "......ist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so on...")
f = File.new("testfile")
f.each(",", 10) { |line| p "#{f.lineno}: #{line}" }
# => "0: This is li"
# "1: ne one... -
IO
# each(rs , limit , chomp: false) -> Enumerator (8028.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として
与えられたブロックを実行します。
ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。
テキスト読み込みメソ......を取り除きます。
@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 { |line| p "......ist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so on...")
f = File.new("testfile")
f.each(",", 10) { |line| p "#{f.lineno}: #{line}" }
# => "0: This is li"
# "1: ne one... -
IO
# each(rs , limit , chomp: false) {|line| . . . } -> self (8028.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として
与えられたブロックを実行します。
ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。
テキスト読み込みメソ......を取り除きます。
@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 { |line| p "......ist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so on...")
f = File.new("testfile")
f.each(",", 10) { |line| p "#{f.lineno}: #{line}" }
# => "0: This is li"
# "1: ne one... -
IO
# each _ line(limit , chomp: false) -> Enumerator (8028.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として
与えられたブロックを実行します。
ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。
テキスト読み込みメソ......を取り除きます。
@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 { |line| p "......ist[例: 行の区切りに半角カンマ、最大読み取りバイト数に 10 を指定][ruby]{
IO.write("testfile", "This is line one,This is line two,This is line three,And so on...")
f = File.new("testfile")
f.each(",", 10) { |line| p "#{f.lineno}: #{line}" }
# => "0: This is li"
# "1: ne one...