ライブラリ
- ビルトイン (967)
- etc (12)
- forwardable (24)
- json (72)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / time (12) - optparse (144)
- rake (24)
-
rdoc
/ markup (12) - resolv (36)
-
rexml
/ document (24) -
webrick
/ httputils (60) - win32ole (12)
クラス
-
ARGF
. class (240) - Array (24)
- BigDecimal (12)
- Class (12)
- Complex (12)
- Date (12)
- DateTime (12)
-
Etc
:: Passwd (12) - Exception (12)
- FalseClass (24)
- Method (36)
- Module (408)
- NilClass (19)
- Object (132)
- OptionParser (144)
-
RDoc
:: Markup (12) -
REXML
:: CData (24) - Range (12)
- Rational (12)
- Regexp (12)
-
Resolv
:: DNS (36) - String (12)
- Struct (12)
- Thread (12)
-
Thread
:: Backtrace :: Location (48) - Time (12)
- TrueClass (24)
- UnboundMethod (12)
-
WEBrick
:: HTTPUtils :: FormData (60) -
WIN32OLE
_ TYPE (12)
モジュール
キーワード
- === (12)
- =~ (7)
- [] (12)
-
_ dump (12) -
absolute
_ path (12) -
add
_ special (12) - arity (12)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - autoload (12)
- backtrace (12)
-
base
_ label (12) -
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) - clone (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) -
define
_ method (24) -
define
_ singleton _ method (24) - delegate (12)
- dup (12)
-
each
_ resource (12) - filename (24)
- filename= (12)
- getc (12)
- getresource (12)
- getresources (12)
- gets (36)
-
inplace
_ mode (12) - inspect (84)
-
instance
_ delegate (12) -
instance
_ method (12) -
json
_ creatable? (12) -
method
_ defined? (12) - name (24)
- name= (12)
-
ole
_ type (12) - on (144)
- path (12)
- pathmap (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) -
public
_ class _ method (24) -
public
_ constant (12) -
public
_ method (12) -
public
_ method _ defined? (12) - putc (12)
-
rake
_ extension (12) - read (12)
-
read
_ nonblock (12) - readchar (12)
- readline (36)
- readpartial (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ method (12) -
set
_ encoding (36) -
singleton
_ class (12) -
singleton
_ method (12) -
source
_ location (12) -
to
_ json (168) -
to
_ json _ raw _ object (12) -
to
_ s (108) -
to
_ str (12) - uclass (12)
-
undef
_ method (12) - value (12)
検索結果
先頭5件
-
ARGF
. class # gets(limit , chomp: false) -> String | nil (3116.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。
...est.txt
# test.rb
ARGF.gets("e") # => "line"
例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt
# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"
@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc... -
ARGF
. class # gets(rs = $ / ) -> String | nil (3116.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。
...est.txt
# test.rb
ARGF.gets("e") # => "line"
例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt
# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"
@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc... -
ARGF
. class # gets(rs = $ / , chomp: false) -> String | nil (3116.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。
...est.txt
# test.rb
ARGF.gets("e") # => "line"
例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt
# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"
@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc... -
ARGF
. class # gets(rs , limit) -> String | nil (3116.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。
...est.txt
# test.rb
ARGF.gets("e") # => "line"
例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt
# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"
@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc... -
ARGF
. class # gets(rs , limit , chomp: false) -> String | nil (3116.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。
...est.txt
# test.rb
ARGF.gets("e") # => "line"
例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt
# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"
@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc... -
ARGF
. class # getc -> String | nil (3114.0) -
self から 1 文字読み込んで返します。EOF に到達した時には nil を返します。
...foo" > file1
$ echo "bar" > file2
$ ruby argf.rb file1 file2
ARGF.getc # => "f"
ARGF.getc # => "o"
ARGF.getc # => "o"
ARGF.getc # => "\n"
ARGF.getc # => "b"
ARGF.getc # => "a"
ARGF.getc # => "r"
ARGF.getc # => "\n"
ARGF.getc # => nil
@see ARGF.class#getbyte, ARGF.class#gets... -
ARGF
. class # inplace _ mode -> String | nil (3114.0) -
c:ARGF#inplace で書き換えるファイルのバックアップに付加される拡 張子を返します。拡張子が設定されていない場合は空文字列を返します。イン プレースモードでない場合は nil を返します。
...空文字列を返します。イン
プレースモードでない場合は nil を返します。
Ruby 起動時の -i オプション や ARGF.class#inplace_mode= で設定します。
例:
# $ echo "test" > test.txt
# $ ruby -i.bak test.rb test.txt
# $ cat test.txt # => "TEST"
# $ cat......ine {|e|print e.upcase} # => "TEST"
例:
# $ echo "test" > test.txt
# $ ruby test.rb test.txt
# $ cat test.txt # => "test"
# test.rb
ARGF.inplace_mode # => nil
ARGF.each_line {|e|print e.upcase} # => "TEST"
@see d:spec/rubycmd#cmd_option, ARGF.class#inplace_mode=... -
ARGF
. class # readline(limit) -> String (3110.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は EOFError を発生します。
...りなしとみなします。空文字列 "" を指定すると連続する改行を行
の区切りとみなします(パラグラフモード)。
@param limit 最大の読み込みバイト数
@raise EOFError EOFに達したら発生する
@see Kernel.#readline, ARGF.class#gets... -
ARGF
. class # readline(rs = $ / ) -> String (3110.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は EOFError を発生します。
...りなしとみなします。空文字列 "" を指定すると連続する改行を行
の区切りとみなします(パラグラフモード)。
@param limit 最大の読み込みバイト数
@raise EOFError EOFに達したら発生する
@see Kernel.#readline, ARGF.class#gets... -
ARGF
. class # readline(rs , limit) -> String (3110.0) -
ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は EOFError を発生します。
...りなしとみなします。空文字列 "" を指定すると連続する改行を行
の区切りとみなします(パラグラフモード)。
@param limit 最大の読み込みバイト数
@raise EOFError EOFに達したら発生する
@see Kernel.#readline, ARGF.class#gets... -
ARGF
. class # filename -> String (3103.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"