種類
- インスタンスメソッド (154)
- 文書 (11)
クラス
- IO (132)
-
Zlib
:: GzipReader (22)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) - each (66)
-
each
_ line (66) - lineno= (11)
検索結果
先頭5件
-
Zlib
:: GzipReader # lineno -> Integer (27341.0) -
IO クラスの同名メソッドIO#linenoと同じです。
...IO クラスの同名メソッドIO#linenoと同じです。
但し、gzip ファイル中に
エラーがあった場合 Zlib::Error 例外や
Zlib::GzipFile::Error 例外が発生します。
gzip ファイルのフッターの処理に注意して下さい。
gzip ファイルのフッターに......チェックサムが
記録されています。GzipReader オブジェクトは、次の時に展開した
データとフッターの照合を行い、エラーがあった場合は
Zlib::GzipFile::NoFooter, Zlib::GzipFile::CRCError,
Zlib::GzipFile::LengthError 例外を発生させます。
*......Zlib::GzipReader#read,
Zlib::GzipReader#gets メソッド等が nil を返す時。
* EOF まで読み込んだ後、Zlib::GzipFile#close メソッドが
呼び出された時。
* EOF まで読み込んだ後、Zlib::GzipReader#unused メソッドが
呼び出された時。
@raise... -
Zlib
:: GzipReader # lineno=(num) (15247.0) -
IO クラスの同名メソッドIO#lineno=と同じです。
...IO クラスの同名メソッドIO#lineno=と同じです。
但し、gzip ファイル中に
エラーがあった場合 Zlib::Error 例外や
Zlib::GzipFile::Error 例外が発生します。
gzip ファイルのフッターの処理に注意して下さい。
gzip ファイルのフッター......チェックサムが
記録されています。GzipReader オブジェクトは、次の時に展開した
データとフッターの照合を行い、エラーがあった場合は
Zlib::GzipFile::NoFooter, Zlib::GzipFile::CRCError,
Zlib::GzipFile::LengthError 例外を発生させます。
*......Zlib::GzipReader#read,
Zlib::GzipReader#gets メソッド等が nil を返す時。
* EOF まで読み込んだ後、Zlib::GzipFile#close メソッドが
呼び出された時。
* EOF まで読み込んだ後、Zlib::GzipReader#unused メソッドが
呼び出された時。
@param... -
IO
# each _ line(limit , chomp: false) {|line| . . . } -> self (12324.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 "#{f.lineno}: #{line}" }
#......uby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...")
f = File.new("testfile")
f.each(chomp: true) { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one"
# "2: This is line two"
# "3: This is line three"
# "4: And so on..."
//}
@see $/, IO#gets... -
IO
# each _ line(rs = $ / , chomp: false) {|line| . . . } -> self (12324.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 "#{f.lineno}: #{line}" }
#......uby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...")
f = File.new("testfile")
f.each(chomp: true) { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one"
# "2: This is line two"
# "3: This is line three"
# "4: And so on..."
//}
@see $/, IO#gets... -
IO
# each _ line(rs , limit , chomp: false) {|line| . . . } -> self (12324.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 "#{f.lineno}: #{line}" }
#......uby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...")
f = File.new("testfile")
f.each(chomp: true) { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one"
# "2: This is line two"
# "3: This is line three"
# "4: And so on..."
//}
@see $/, IO#gets... -
IO
# each _ line(limit) {|line| . . . } -> self (12318.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 "#{f.lineno}: #{line}" }
#......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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,"
# "3: And so on."
# "4: .."
//}
@see $/, IO#gets... -
IO
# each _ line(rs = $ / ) {|line| . . . } -> self (12318.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 "#{f.lineno}: #{line}" }
#......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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,"
# "3: And so on."
# "4: .."
//}
@see $/, IO#gets... -
IO
# each _ line(rs , limit) {|line| . . . } -> self (12318.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 "#{f.lineno}: #{line}" }
#......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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,"
# "3: And so on."
# "4: .."
//}
@see $/, IO#gets... -
IO
# each _ line(limit , chomp: false) -> Enumerator (12224.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 "#{f.lineno}: #{line}" }
#......uby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...")
f = File.new("testfile")
f.each(chomp: true) { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one"
# "2: This is line two"
# "3: This is line three"
# "4: And so on..."
//}
@see $/, IO#gets... -
IO
# each _ line(rs = $ / , chomp: false) -> Enumerator (12224.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 "#{f.lineno}: #{line}" }
#......uby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...")
f = File.new("testfile")
f.each(chomp: true) { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one"
# "2: This is line two"
# "3: This is line three"
# "4: And so on..."
//}
@see $/, IO#gets... -
IO
# each _ line(rs , limit , chomp: false) -> Enumerator (12224.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 "#{f.lineno}: #{line}" }
#......uby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...")
f = File.new("testfile")
f.each(chomp: true) { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one"
# "2: This is line two"
# "3: This is line three"
# "4: And so on..."
//}
@see $/, IO#gets... -
IO
# each _ line(limit) -> Enumerator (12218.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 "#{f.lineno}: #{line}" }
#......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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,"
# "3: And so on."
# "4: .."
//}
@see $/, IO#gets... -
IO
# each _ line(rs = $ / ) -> Enumerator (12218.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 "#{f.lineno}: #{line}" }
#......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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,"
# "3: And so on."
# "4: .."
//}
@see $/, IO#gets... -
IO
# each _ line(rs , limit) -> Enumerator (12218.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 "#{f.lineno}: #{line}" }
#......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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,"
# "3: And so on."
# "4: .."
//}
@see $/, IO#gets... -
IO
# each(limit , chomp: false) -> Enumerator (9224.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 "#{f.lineno}: #{line}" }
#......uby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...")
f = File.new("testfile")
f.each(chomp: true) { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one"
# "2: This is line two"
# "3: This is line three"
# "4: And so on..."
//}
@see $/, IO#gets... -
IO
# each(limit , chomp: false) {|line| . . . } -> self (9224.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 "#{f.lineno}: #{line}" }
#......uby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...")
f = File.new("testfile")
f.each(chomp: true) { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one"
# "2: This is line two"
# "3: This is line three"
# "4: And so on..."
//}
@see $/, IO#gets...