ライブラリ
- ビルトイン (2550)
- csv (84)
- dbm (72)
- gdbm (72)
- getoptlong (60)
- matrix (244)
-
net
/ http (96) -
net
/ pop (132) -
net
/ smtp (36) - openssl (60)
- ostruct (24)
- pathname (75)
- pp (12)
- prettyprint (1)
- prime (96)
- psych (24)
- rake (12)
-
rdoc
/ context (48) - resolv (84)
-
rexml
/ document (204) -
rexml
/ parsers / pullparser (12) -
rinda
/ tuplespace (12) -
rubygems
/ config _ file (12) -
rubygems
/ package / tar _ input (12) -
rubygems
/ package / tar _ reader (36) -
rubygems
/ source _ index (24) - sdbm (72)
- set (108)
- shell (30)
-
shell
/ builtin-command (36) -
shell
/ command-processor (30) -
shell
/ filter (36) -
shell
/ system-command (12) - socket (12)
- stringio (176)
- thread (18)
- tsort (117)
- un (12)
-
webrick
/ httpauth / htdigest (12) -
webrick
/ httpauth / htpasswd (12) -
webrick
/ httprequest (12) -
webrick
/ httpresponse (12) -
webrick
/ httputils (12) -
win32
/ registry (36) - win32ole (168)
-
yaml
/ dbm (36) - zlib (120)
クラス
-
ARGF
. class (264) - Array (213)
- BasicSocket (12)
- CSV (24)
-
CSV
:: Row (24) -
CSV
:: Table (36) - DBM (72)
- Dir (62)
- Enumerator (163)
-
Enumerator
:: ArithmeticSequence (14) -
Enumerator
:: Chain (14) -
Enumerator
:: Lazy (171) -
Enumerator
:: Yielder (30) - GDBM (72)
-
Gem
:: ConfigFile (12) -
Gem
:: Package :: TarInput (12) -
Gem
:: Package :: TarReader (36) -
Gem
:: SourceIndex (24) - GetoptLong (60)
- Hash (182)
- IO (300)
- Matrix (196)
- Module (36)
-
Net
:: POP3 (24) -
Net
:: POPMail (108) -
Net
:: SMTP (36) - Object (60)
-
OpenSSL
:: ASN1 :: Constructive (12) -
OpenSSL
:: Config (12) - OpenStruct (24)
- PP (12)
- Pathname (75)
- PrettyPrint (1)
- Prime (24)
-
Prime
:: PseudoPrimeGenerator (72) -
Psych
:: Nodes :: Node (24) -
RDoc
:: Context (48) -
REXML
:: AttlistDecl (12) -
REXML
:: Attributes (24) -
REXML
:: Element (36) -
REXML
:: Elements (48) -
REXML
:: Parent (72) -
REXML
:: Parsers :: PullParser (12) -
Rake
:: TaskArguments (12) - Range (28)
- Resolv (24)
-
Resolv
:: DNS (36) -
Resolv
:: Hosts (24) -
Rinda
:: TupleSpace (12) - SDBM (72)
- Set (144)
- 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) -
Shell
:: Void (6) - StopIteration (12)
- String (260)
- StringIO (176)
- Struct (48)
- Thread (48)
-
Thread
:: Queue (82) -
Thread
:: SizedQueue (46) - Vector (48)
-
WEBrick
:: HTTPAuth :: Htdigest (12) -
WEBrick
:: HTTPAuth :: Htpasswd (12) -
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPResponse (12) -
WEBrick
:: HTTPUtils :: FormData (12) - WIN32OLE (48)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ PARAM (24) -
WIN32OLE
_ TYPE (24) -
WIN32OLE
_ VARIABLE (60) -
Win32
:: Registry (36) -
YAML
:: DBM (36) -
Zlib
:: GzipReader (96) -
Zlib
:: GzipWriter (24)
モジュール
- Enumerable (499)
- Kernel (12)
-
Net
:: HTTPHeader (96) -
OpenSSL
:: Buffering (36) -
REXML
:: Node (12) - TSort (117)
キーワード
- & (12)
- + (19)
- - (12)
- << (12)
- [] (12)
- ^ (12)
- all (36)
-
append
_ features (12) - bytes (66)
-
canonical
_ each (12) - cat (18)
- chars (66)
- chmod (12)
- chunk (36)
-
chunk
_ while (12) - clear (12)
- close (10)
- closed? (10)
- codepoints (66)
- 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
_ attribute (24) -
each
_ byte (132) -
each
_ capitalized (12) -
each
_ capitalized _ name (12) -
each
_ char (96) -
each
_ child (62) -
each
_ classmodule (12) -
each
_ codepoint (96) -
each
_ cons (24) -
each
_ constant (12) -
each
_ data (12) -
each
_ element (12) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) -
each
_ entry (51) -
each
_ filename (12) -
each
_ grapheme _ cluster (16) -
each
_ header (12) -
each
_ index (48) -
each
_ key (84) -
each
_ line (228) -
each
_ mail (12) -
each
_ method (12) -
each
_ name (48) -
each
_ option (12) -
each
_ pair (120) -
each
_ recursive (12) -
each
_ resource (12) -
each
_ slice (24) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) -
each
_ value (96) -
each
_ with _ index (72) -
each
_ with _ object (24) - eager (6)
- echo (18)
- entries (12)
-
enum
_ for (48) - eof (12)
- eof? (12)
-
extend
_ object (12) - feed (12)
- filter! (14)
-
find
_ index (36) - first (24)
- first? (1)
-
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) - length (12)
- 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 (24)
- push (24)
- quiet= (12)
- recvmsg (12)
- reduce (36)
- rehash (12)
- reject! (24)
- replace (48)
-
respond
_ to? (12) - result (12)
-
reverse
_ each (52) - rewind (24)
- select! (24)
-
send
_ mail (12) - sendmail (12)
- seplist (12)
- shift (24)
- size (12)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) -
strongly
_ connected _ components (12) - subtract (12)
- sum (36)
-
super
_ each (6) - take (12)
-
take
_ while (24) - tee (18)
- tell (24)
-
to
_ a (24) -
to
_ enum (48) -
to
_ h (19) -
to
_ proc (6) -
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 (24)
- variables (12)
-
with
_ index (48) -
with
_ object (24) - yield (12)
- zip (48)
- | (12)
検索結果
先頭5件
- Prime
# each(upper _ bound = nil , generator = EratosthenesGenerator . new) -> Enumerator - Prime
# each(upper _ bound = nil , generator = EratosthenesGenerator . new) {|prime| . . . } -> object - REXML
:: Elements # each(xpath = nil) {|element| . . . } -> [REXML :: Elements] - IO
# each(limit , chomp: false) -> Enumerator - IO
# each(limit , chomp: false) {|line| . . . } -> self
-
Prime
# each(upper _ bound = nil , generator = EratosthenesGenerator . new) -> Enumerator (18151.0) -
全ての素数を順番に与えられたブロックに渡して評価します。
...例][ruby]{
require 'prime'
Prime.each(6){|prime| prime } # => 5
Prime.each(7){|prime| prime } # => 7
Prime.each(10){|prime| prime } # => 7
Prime.each(11){|prime| prime } # => 11
//}
//emlist[例: 30以下の双子素数][ruby]{
require 'prime'
Prime.each(30).each_cons(2).select{|p,r| r-p == 2}
#......ない数列が発生します。
//emlist[例][ruby]{
require 'prime'
Prime.each(50, Prime::Generator23.new) do |n|
p n #=> [2, 3, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49]
end
//}
@see Prime.each, Prime::EratosthenesGenerator, Prime::TrialDivisionGenerator, Prime::Generator2... -
Prime
# each(upper _ bound = nil , generator = EratosthenesGenerator . new) {|prime| . . . } -> object (18151.0) -
全ての素数を順番に与えられたブロックに渡して評価します。
...例][ruby]{
require 'prime'
Prime.each(6){|prime| prime } # => 5
Prime.each(7){|prime| prime } # => 7
Prime.each(10){|prime| prime } # => 7
Prime.each(11){|prime| prime } # => 11
//}
//emlist[例: 30以下の双子素数][ruby]{
require 'prime'
Prime.each(30).each_cons(2).select{|p,r| r-p == 2}
#......ない数列が発生します。
//emlist[例][ruby]{
require 'prime'
Prime.each(50, Prime::Generator23.new) do |n|
p n #=> [2, 3, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49]
end
//}
@see Prime.each, Prime::EratosthenesGenerator, Prime::TrialDivisionGenerator, Prime::Generator2... -
REXML
:: Elements # each(xpath = nil) {|element| . . . } -> [REXML :: Elements] (18132.0) -
全ての子要素に対しブロックを呼び出します。
...。
xpath を指定した場合には、その XPath 文字列に
マッチする要素に対しブロックを呼び出します。
REXML::XPath.each などとは異なり、要素以外の
テキストノードなどはすべて無視されることに注意してください。
@param xpath XP......ブロックに渡される
doc.root.elements.each {|e|p e}
# <b/>, <b/> がブロックに渡される
doc.root.elements.each('b') {|e|p e} #-> Yields b, b elements
# <b/>,<c/>,<d/>,<b/>,<c/>,<d/> がブロックに渡される
doc.root.elements.each('child::node()') {|e|p e}
# <b/>,<c/>,<d/>,"se......an",<b/>,<c/>,<d/> がブロックに渡される
REXML::XPath.each(doc.root, 'child::node()'){|node| p node }
//}... -
IO
# each(limit , chomp: false) -> Enumerator (18131.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...: 引数なし][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..."
//}
//e......ト数に 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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,......t[例: chomp = true][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(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..."
/... -
IO
# each(limit , chomp: false) {|line| . . . } -> self (18131.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...: 引数なし][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..."
//}
//e......ト数に 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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,......t[例: chomp = true][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(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..."
/... -
IO
# each(rs = $ / , chomp: false) -> Enumerator (18131.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...: 引数なし][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..."
//}
//e......ト数に 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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,......t[例: chomp = true][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(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..."
/... -
IO
# each(rs = $ / , chomp: false) {|line| . . . } -> self (18131.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...: 引数なし][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..."
//}
//e......ト数に 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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,......t[例: chomp = true][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(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..."
/... -
IO
# each(rs , limit , chomp: false) -> Enumerator (18131.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...: 引数なし][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..."
//}
//e......ト数に 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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,......t[例: chomp = true][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(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..."
/... -
IO
# each(rs , limit , chomp: false) {|line| . . . } -> self (18131.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...: 引数なし][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..."
//}
//e......ト数に 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,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,......t[例: chomp = true][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(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..."
/... -
ARGF
. class # each(rs = $ / ) -> Enumerator (18127.0) -
ARGFの現在位置から 1 行ずつ文字列として読み込み、それを引数として与えら れたブロックを実行します。
...フモード)。
@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... -
ARGF
. class # each(rs = $ / ) { |line| . . . } -> self (18127.0) -
ARGFの現在位置から 1 行ずつ文字列として読み込み、それを引数として与えら れたブロックを実行します。
...フモード)。
@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...