372件ヒット
[1-100件を表示]
(0.029秒)
種類
- インスタンスメソッド (204)
- モジュール関数 (72)
- 特異メソッド (72)
- 文書 (24)
クラス
-
ARGF
. class (24) - Exception (12)
- Pathname (120)
-
RubyVM
:: InstructionSequence (12) -
URI
:: FTP (24) -
URI
:: Generic (12) -
URI
:: HTTP (12) -
URI
:: LDAP (12) -
URI
:: MailTo (12)
モジュール
- Kernel (96)
-
Rake
:: TaskManager (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - binread (12)
-
create
_ makefile (12) -
create
_ rule (12) -
dir
_ config (12) -
each
_ line (24) - exec (24)
- filename (12)
- fnmatch (12)
- fnmatch? (12)
- join (12)
- mkdir (12)
- new (60)
- new2 (12)
- read (12)
- readlines (12)
-
ruby 1
. 6 feature (12) - spawn (24)
- sysopen (12)
- system (24)
-
to
_ a (12) -
to
_ json (12)
検索結果
先頭5件
-
ARGF
. class # path -> String (18101.0) -
現在開いている処理対象のファイル名を返します。
...は - を返します。
組み込み変数 $FILENAME と同じです。
$ echo "foo" > foo
$ echo "bar" > bar
$ echo "glark" > glark
$ ruby argf.rb foo bar glark
ARGF.filename # => "foo"
ARGF.read(5) # => "foo\nb"
ARGF.filename # => "bar"
ARGF.skip
ARGF.filename # => "glark"... -
Pathname
# join(*args) -> Pathname (3248.0) -
与えられたパス名を連結します。
...。
@param args 連結したいディレクトリ名やファイル名を文字列で与えます。
//emlist[例][ruby]{
require "pathname"
path0 = Pathname("/usr") # Pathname:/usr
path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby
# 上記の path0 の処理は......下記の path1 と同様のパスになります
path1 = Pathname("/usr") + "bin/ruby" # Pathname:/usr/bin/ruby
path0 == path1 #=> true
//}... -
Pathname
# fnmatch(pattern , *args) -> bool (3124.0) -
File.fnmatch(pattern, self.to_s, *args) と同じです。
...tch(pattern, self.to_s, *args) と同じです。
@param pattern パターンを文字列で指定します。ワイルドカードとして `*', `?', `[]' が使用できま
す。Dir.glob とは違って `{}' や `**/' は使用できません。
@param args File.fnmatch を参照......してください。
//emlist[例][ruby]{
require "pathname"
path = Pathname("testfile")
path.fnmatch("test*") # => true
path.fnmatch("TEST*") # => false
path.fnmatch("TEST*", File::FNM_CASEFOLD) # => true
//}
@see File.fnmatch... -
Pathname
# binread(*args) -> String | nil (3100.0) -
IO.binread(self.to_s, *args)と同じです。
...inread(self.to_s, *args)と同じです。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("testfile")
pathname.binread # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
pathname.binread(20) # => "This is line one\nThi"
pathname.binread(20, 1... -
Pathname
# each _ line(*args) -> Enumerator (3100.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
...O.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("test......file", "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 (3100.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
...O.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("test......file", "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
# fnmatch?(pattern , *args) -> bool (3100.0) -
File.fnmatch?(pattern, self.to_s, *args) と同じです。
...ch?(pattern, self.to_s, *args) と同じです。
@param pattern パターンを文字列で指定します。ワイルドカードとして `*', `?', `[]' が使用できま
す。Dir.glob とは違って `{}' や `**/' は使用できません。
@param args File.fnmatch を参照... -
Pathname
# mkdir(*args) -> 0 (3100.0) -
Dir.mkdir(self.to_s, *args) と同じです。
...Dir.mkdir(self.to_s, *args) と同じです。
@see Dir.mkdir... -
Pathname
# read(*args) -> String | nil (3100.0) -
IO.read(self.to_s, *args)と同じです。
...IO.read(self.to_s, *args)と同じです。
@see IO.read...