るりまサーチ

最速Rubyリファレンスマニュアル検索!
77件ヒット [1-77件を表示] (0.023秒)
トップページ > クエリ:-[x] > クエリ:BLOCK[x] > ライブラリ:pathname[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

クラス

キーワード

検索結果

Pathname#blockdev? -> bool (6202.0)

FileTest.blockdev?(self.to_s) と同じです。

...FileTest.blockdev?(self.to_s) と同じです。


@see FileTest.#blockdev?...

Pathname#each_line(*args) -> Enumerator (118.0)

IO.foreach(self.to_s, *args, &block) と同じです。

...ach(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\n")
Pathname
("testfile").each_line {|f| p f }

# => "line1\n"
# => "line2,\n"
# => "line3\n"
//}

//emlist[例 limit を指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line(4) {|f| p f }

# => "line"
# => "1\n"
# => "...
...line"
# => "2,\n"
# => "line"
# => "3\n"
//}

//emlist[例 sep を指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line(",") {|f| p f }

# => "line1\nline2,"
# => "\nline3\n"
//}

@see IO.foreach...

Pathname#each_line(*args) {|line| ... } -> nil (118.0)

IO.foreach(self.to_s, *args, &block) と同じです。

...ach(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\n")
Pathname
("testfile").each_line {|f| p f }

# => "line1\n"
# => "line2,\n"
# => "line3\n"
//}

//emlist[例 limit を指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line(4) {|f| p f }

# => "line"
# => "1\n"
# => "...
...line"
# => "2,\n"
# => "line"
# => "3\n"
//}

//emlist[例 sep を指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname
("testfile").each_line(",") {|f| p f }

# => "line1\nline2,"
# => "\nline3\n"
//}

@see IO.foreach...

Pathname#open(mode = &#39;r&#39;, perm = 0666) -> File (118.0)

File.open(self.to_s, *args, &block) と同じです。

...File.open(self.to_s, *args, &block) と同じです。


@see File.open...

Pathname#open(mode = &#39;r&#39;, perm = 0666) {|file| ... } -> object (118.0)

File.open(self.to_s, *args, &block) と同じです。

...File.open(self.to_s, *args, &block) と同じです。


@see File.open...

絞り込み条件を変える

Pathname#opendir -> Dir (118.0)

Dir.open(self.to_s, &block) と同じです。

...Dir.open(self.to_s, &block) と同じです。


@see Dir.open...

Pathname#opendir {|dir| ... } -> nil (118.0)

Dir.open(self.to_s, &block) と同じです。

...Dir.open(self.to_s, &block) と同じです。


@see Dir.open...