2件ヒット
[1-2件を表示]
(0.223秒)
検索結果
-
Pathname
# each _ line(*args) -> Enumerator (54430.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
IO.foreach(self.to_s, *args, &block) と同じです。
//emlist[例][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}
//emlist[例 ブロックを指定][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\... -
Pathname
# each _ line(*args) {|line| . . . } -> nil (54430.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
IO.foreach(self.to_s, *args, &block) と同じです。
//emlist[例][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}
//emlist[例 ブロックを指定][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\...