ライブラリ
- ビルトイン (2204)
- csv (48)
- dbm (24)
- gdbm (24)
- getoptlong (60)
- matrix (220)
-
net
/ pop (132) -
net
/ smtp (36) - openssl (24)
- pathname (63)
- pp (12)
- prime (72)
- rake (12)
-
rdoc
/ context (12) - resolv (84)
-
rexml
/ document (84) -
rexml
/ parsers / pullparser (12) -
rinda
/ tuplespace (12) -
rubygems
/ package / tar _ input (12) -
rubygems
/ package / tar _ reader (12) - sdbm (24)
- set (99)
- shell (30)
-
shell
/ builtin-command (30) -
shell
/ command-processor (30) -
shell
/ filter (36) -
shell
/ system-command (12) - socket (12)
- stringio (176)
- thread (12)
- tsort (117)
- un (12)
-
win32
/ registry (36) - win32ole (168)
- zlib (72)
クラス
-
ARGF
. class (198) - Array (213)
- BasicSocket (12)
- CSV (12)
-
CSV
:: Row (24) -
CSV
:: Table (12) - DBM (24)
- Dir (62)
- Enumerator (139)
-
Enumerator
:: ArithmeticSequence (14) -
Enumerator
:: Lazy (117) - GDBM (24)
-
Gem
:: Package :: TarInput (12) -
Gem
:: Package :: TarReader (12) - GetoptLong (60)
- Hash (182)
- IO (276)
- Matrix (196)
- Module (36)
-
Net
:: POP3 (24) -
Net
:: POPMail (108) -
Net
:: SMTP (36) - Object (60)
- PP (12)
- Pathname (63)
- Prime (24)
-
Prime
:: PseudoPrimeGenerator (48) -
RDoc
:: Context (12) -
REXML
:: Element (36) -
REXML
:: Elements (48) -
REXML
:: Parsers :: PullParser (12) -
Rake
:: TaskArguments (12) - Range (33)
- Resolv (24)
-
Resolv
:: DNS (36) -
Resolv
:: Hosts (24) -
Rinda
:: TupleSpace (12) - SDBM (24)
- Set (132)
- Shell (30)
-
Shell
:: Cat (6) -
Shell
:: CommandProcessor (30) -
Shell
:: Concat (6) -
Shell
:: Echo (6) -
Shell
:: Filter (36) -
Shell
:: Glob (6) -
Shell
:: SystemCommand (12) -
Shell
:: Tee (6) - String (260)
- StringIO (176)
- Thread (36)
-
Thread
:: Queue (36) -
Thread
:: SizedQueue (46) - Vector (24)
- WIN32OLE (48)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ PARAM (24) -
WIN32OLE
_ TYPE (24) -
WIN32OLE
_ VARIABLE (60) -
Win32
:: Registry (36) -
Zlib
:: GzipReader (72)
モジュール
- Enumerable (475)
- Kernel (12)
-
OpenSSL
:: Buffering (24) - TSort (117)
キーワード
- % (2)
- & (12)
- + (19)
- - (12)
- [] (12)
- ^ (12)
- all (36)
-
append
_ features (12) - bytes (52)
- cat (18)
- chars (52)
- chmod (12)
- chunk (36)
-
chunk
_ while (12) - close (10)
- codepoints (52)
- collect (36)
- collect! (38)
-
collect
_ concat (12) - count (36)
- default (12)
-
default
_ event _ sources (12) -
delete
_ if (24) - deq (24)
- difference (12)
- drop (12)
- each2 (24)
-
each
_ address (36) -
each
_ byte (120) -
each
_ char (96) -
each
_ child (38) -
each
_ classmodule (12) -
each
_ codepoint (48) -
each
_ cons (24) -
each
_ element (12) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) -
each
_ entry (39) -
each
_ grapheme _ cluster (16) -
each
_ index (24) -
each
_ key (36) -
each
_ line (228) -
each
_ mail (12) -
each
_ name (36) -
each
_ option (12) -
each
_ pair (24) -
each
_ resource (12) -
each
_ slice (24) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) -
each
_ value (36) -
each
_ with _ index (72) -
each
_ with _ object (24) - echo (18)
- entries (12)
-
enum
_ for (24) -
extend
_ object (12) - feed (12)
- filter! (14)
-
find
_ index (36) - first (24)
-
flat
_ map (12) -
force
_ quotes? (12) - foreach (18)
- glob (18)
-
grapheme
_ clusters (16) - handler= (12)
- index (36)
- inject (48)
-
inplace
_ mode (12) -
instance
_ method (12) - intersection (12)
- invert (12)
- join (24)
-
keep
_ if (24) - lines (122)
- mail (36)
- map (24)
- map! (38)
- merge (12)
- name (12)
- next (12)
-
next
_ values (12) - notify (12)
-
ole
_ func _ methods (12) -
ole
_ get _ methods (12) -
ole
_ query _ interface (12) -
ole
_ type (12) -
ole
_ type _ detail (12) - ordering= (12)
- output? (12)
- pack (21)
-
peek
_ values (12) - pop (60)
- pos (12)
- push (24)
- quiet= (12)
- recvmsg (12)
- reduce (36)
- rehash (12)
- reject! (24)
- replace (48)
-
respond
_ to? (12) -
reverse
_ each (28) - rewind (24)
- select! (24)
-
send
_ mail (12) - sendmail (12)
- seplist (12)
- shift (24)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) - step (3)
-
strongly
_ connected _ components (12) - subtract (12)
- sum (36)
-
super
_ each (6) - take (12)
-
take
_ while (24) - tee (18)
- tell (12)
-
to
_ a (24) -
to
_ enum (24) -
to
_ h (19) -
to
_ s (12) - tsort (12)
-
tsort
_ each (23) -
tsort
_ each _ child (12) -
tsort
_ each _ node (12) - union (12)
- unpack (12)
- update (36)
- upto (12)
- value (12)
- variables (12)
-
with
_ index (24) -
with
_ object (24) - zip (48)
- | (12)
検索結果
先頭5件
-
IO
# each(limit , chomp: false) -> Enumerator (18161.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。
@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}" }
# => "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 (18161.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。
@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}" }
# => "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 (18161.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。
@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}" }
# => "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) {|line| . . . } -> self (18161.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。
@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}" }
# => "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 (18161.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。
@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}" }
# => "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 (18161.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。
@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}" }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カンマ、最... -
Hash
# each -> Enumerator (18159.0) -
ハッシュのキーと値を引数としてブロックを評価します。
...
each_pair は each のエイリアスです。
//emlist[例][ruby]{
{:a=>1, :b=>2}.each {|a| p a}
#=> [:a, 1]
# [:b, 2]
{:a=>1, :b=>2}.each {|k, v| p [k, v]}
#=> [:a, 1]
# [:b, 2]
p({:a=>1, :b=>2}.each_pair) # => #<Enumerator: {:a=>1, :b=>2}:each_pair>
//}
@see Hash#each_key,Hash#each_val... -
Hash
# each {|key , value| . . . } -> self (18159.0) -
ハッシュのキーと値を引数としてブロックを評価します。
...
each_pair は each のエイリアスです。
//emlist[例][ruby]{
{:a=>1, :b=>2}.each {|a| p a}
#=> [:a, 1]
# [:b, 2]
{:a=>1, :b=>2}.each {|k, v| p [k, v]}
#=> [:a, 1]
# [:b, 2]
p({:a=>1, :b=>2}.each_pair) # => #<Enumerator: {:a=>1, :b=>2}:each_pair>
//}
@see Hash#each_key,Hash#each_val... -
IO
# each(limit) -> Enumerator (18149.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......込みバイト数
@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.lin......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) {|line| . . . } -> self (18149.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......込みバイト数
@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.lin......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(rs = $ / ) -> Enumerator (18149.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......込みバイト数
@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.lin......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(rs = $ / ) {|line| . . . } -> self (18149.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......込みバイト数
@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.lin......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(rs , limit) -> Enumerator (18149.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......込みバイト数
@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.lin......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(rs , limit) {|line| . . . } -> self (18149.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...合があります。
@param rs 行の区切りを文字列で指定します。rs に nil を指定すると行区切りなしとみなします。
空文字列 "" を指定すると連続する改行を行の区切りとみなします(パラグラフモード)。
@param limit 最大の......込みバイト数
@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.lin......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... -
ARGF
. class # each(rs = $ / ) -> Enumerator (18145.0) -
ARGFの現在位置から 1 行ずつ文字列として読み込み、それを引数として与えら れたブロックを実行します。
...使用します。
@param rs 行の区切りを文字列で指定します。nil を指定すると行区切りなし
とみなします。空文字列 "" を指定すると連続する改行を行の区切
りとみなします(パラグラフモード)。
@param limit 各行......の最大の読み込みバイト数
例: ARGFの各ファイル名(最初に1回のみ)、行番号、内容を表示
ARGF.each_line do |line|
puts ARGF.filename if ARGF.lineno == 1
puts "#{ARGF.lineno}: #{line}"
end
@see IO#each, IO#each_line...