種類
ライブラリ
クラス
-
ARGF
. class (99) - CSV (88)
- IO (139)
-
IRB
:: Context (22) -
IRB
:: ReadlineInputMethod (66) - Pathname (22)
- StringIO (22)
- Thread (22)
-
Thread
:: Backtrace :: Location (11) -
Zlib
:: GzipReader (110)
オブジェクト
-
Readline
:: HISTORY (154)
キーワード
-
$ INPUT _ LINE _ NUMBER (11) -
$ LAST _ READ _ LINE (11) -
$ NR (11) - << (11)
- CSV (11)
-
FILENAME
_ COMPLETION _ PROC (11) - HISTORY (11)
- IO (11)
-
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (4) - Readline (11)
- ReadlineInputMethod (11)
-
SC
_ READER _ WRITER _ LOCKS (11) -
SC
_ THREADS (11) -
SC
_ THREAD _ ATTR _ STACKADDR (11) -
SC
_ THREAD _ ATTR _ STACKSIZE (11) -
SC
_ THREAD _ CPUTIME (11) -
SC
_ THREAD _ DESTRUCTOR _ ITERATIONS (11) -
SC
_ THREAD _ KEYS _ MAX (11) -
SC
_ THREAD _ PRIORITY _ SCHEDULING (11) -
SC
_ THREAD _ PRIO _ INHERIT (11) -
SC
_ THREAD _ PRIO _ PROTECT (11) -
SC
_ THREAD _ PROCESS _ SHARED (11) -
SC
_ THREAD _ ROBUST _ PRIO _ INHERIT (11) -
SC
_ THREAD _ ROBUST _ PRIO _ PROTECT (11) -
SC
_ THREAD _ SAFE _ FUNCTIONS (11) -
SC
_ THREAD _ SPORADIC _ SERVER (11) -
SC
_ THREAD _ STACK _ MIN (11) -
SC
_ THREAD _ THREADS _ MAX (11) -
SC
_ XOPEN _ REALTIME _ THREADS (11) - SizedQueue (11)
-
USERNAME
_ COMPLETION _ PROC (11) - VERSION (11)
- [] (11)
- []= (11)
-
add
_ trace _ func (11) -
basic
_ quote _ characters (11) -
basic
_ quote _ characters= (11) -
basic
_ word _ break _ characters (11) -
basic
_ word _ break _ characters= (11) - binread (22)
- clear (11)
-
completer
_ quote _ characters (11) -
completer
_ quote _ characters= (11) -
completer
_ word _ break _ characters (11) -
completer
_ word _ break _ characters= (11) -
completion
_ append _ character (11) -
completion
_ append _ character= (11) -
completion
_ case _ fold (11) -
completion
_ case _ fold= (11) -
completion
_ proc (11) -
completion
_ proc= (11) - convert (33)
-
delete
_ at (11) - each (44)
-
each
_ line (22) -
emacs
_ editing _ mode (11) - empty? (11)
- encoding (11)
- eof (11)
- eof? (22)
-
field
_ size _ limit (11) -
filename
_ quote _ characters (11) -
filename
_ quote _ characters= (11) -
get
_ screen _ size (11) - gets (11)
- input= (11)
- length (11)
- lineno (22)
- lineno= (11)
- new (22)
- open-uri (11)
- output= (11)
-
pipeline
_ r (22) -
pipeline
_ rw (22) -
pipeline
_ start (11) -
pipeline
_ w (11) - pop (11)
- pread (7)
- push (11)
-
readable
_ atfer _ eof? (11) - readline (143)
- readlines (176)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 9 feature (11) -
set
_ screen _ size (11) -
set
_ trace _ func (11) - shift (11)
- size (11)
- timeout (19)
-
to
_ a (33) -
to
_ s (11) -
use
_ readline (11) -
use
_ readline? (11) -
vi
_ editing _ mode (11) - write (22)
検索結果
先頭5件
-
readline (32000.0)
-
GNU Readline によるコマンドライン入力インタフェースを提供するライブラリです。
...GNU Readline によるコマンドライン入力インタフェースを提供するライブラリです。... -
IRB
:: ReadlineInputMethod # line(line _ no) -> String (24224.0) -
引数 line_no で指定した過去の入力を行単位で返します。
...引数 line_no で指定した過去の入力を行単位で返します。
@param line_no 取得する行番号を整数で指定します。... -
Readline
. # readline(prompt = "" , add _ hist = false) -> String | nil (18200.0) -
prompt を出力し、ユーザからのキー入力を待ちます。 エンターキーの押下などでユーザが文字列を入力し終えると、 入力した文字列を返します。 このとき、add_hist が true であれば、入力した文字列を入力履歴に追加します。 何も入力していない状態で EOF(UNIX では ^D) を入力するなどで、 ユーザからの入力がない場合は nil を返します。
...:
require "readline"
input = Readline.readline
(プロンプトなどは表示せずに、入力待ちの状態になります。
ここでは「abc」を入力後、エンターキーを押したと想定します。)
abc
p input # => "abc"
input = Readline.readline("> ")
(">"......p input # => "ls"
input = Readline.readline("> ", true)
(">"を表示し、入力待ちの状態になります。
ここでは「cd」を入力後、エンターキーを押したと想定します。)
> cd
p input # => "cd"
input = Readline.readline("> ", true)
(">"を表示......る。
require 'readline'
stty_save = `stty -g`.chomp
begin
while buf = Readline.readline
p buf
end
rescue Interrupt
system("stty", stty_save)
exit
end
例: INTシグナルを捕捉して、端末状態を復帰する。
require 'readline'
stty_save = `stty... -
Zlib
:: GzipReader # readline(rs = $ / ) -> String (15206.0) -
IO クラスの同名メソッドIO#readlineと同じです。
...IO クラスの同名メソッドIO#readlineと同じです。
但し、gzip ファイル中に
エラーがあった場合 Zlib::Error 例外や
Zlib::GzipFile::Error 例外が発生します。
gzip ファイルのフッターの処理に注意して下さい。
gzip ファイルのフッター......には圧縮前データのチェックサムが
記録されています。GzipReader オブジェクトは、次の時に展開した
データとフッターの照合を行い、エラーがあった場合は
Zlib::GzipFile::NoFooter, Zlib::GzipFile::CRCError,
Zlib::GzipFile::LengthError 例外......時。
すなわち Zlib::GzipReader#read,
Zlib::GzipReader#gets メソッド等が nil を返す時。
* EOF まで読み込んだ後、Zlib::GzipFile#close メソッドが
呼び出された時。
* EOF まで読み込んだ後、Zlib::GzipReader#unused メソッドが
呼び... -
Zlib
:: GzipReader # readlines(rs = $ / ) -> Array (15206.0) -
IO クラスの同名メソッドIO#readlinesと同じです。
...IO クラスの同名メソッドIO#readlinesと同じです。
但し、gzip ファイル中に
エラーがあった場合 Zlib::Error 例外や
Zlib::GzipFile::Error 例外が発生します。
gzip ファイルのフッターの処理に注意して下さい。
gzip ファイルのフッター......には圧縮前データのチェックサムが
記録されています。GzipReader オブジェクトは、次の時に展開した
データとフッターの照合を行い、エラーがあった場合は
Zlib::GzipFile::NoFooter, Zlib::GzipFile::CRCError,
Zlib::GzipFile::LengthError 例外......時。
すなわち Zlib::GzipReader#read,
Zlib::GzipReader#gets メソッド等が nil を返す時。
* EOF まで読み込んだ後、Zlib::GzipFile#close メソッドが
呼び出された時。
* EOF まで読み込んだ後、Zlib::GzipReader#unused メソッドが
呼び... -
IO
# readlines(limit , chomp: false) -> [String] (12260.0) -
データを全て読み込んで、その各行を要素としてもつ配列を返します。 既に EOF に達していれば空配列 [] を返します。
...", "line1,\nline2,\nline3,\n")
File.open("testfile") { |f| p f.readlines } # => ["line1,\n", "line2,\n", "line3,\n"]
File.open("testfile") { |f| p f.readlines(3) } # => ["lin", "e1,", "\n", "lin", "e2,", "\n", "lin", "e3,", "\n"]
File.open("testfile") { |f| p f.readlines(",") } # => ["line1,"......, "\nline2,", "\nline3,", "\n"]
//}
//emlist[例: rsを取り除く(chomp = true)][ruby]{
IO.write("testfile", "line1,\rline2,\r\nline3,\n")
File.open("testfile") { |f| p f.readlines(chomp: true) } # => ["line1,\rline2,", "line3,"]
File.open("testfile") { |f| p f.readlines("\r", chomp: tr......ue) } # => ["line1,", "line2,", "\nline3,\n"]
//}
@see $/, IO#gets... -
IO
# readlines(rs = $ / , chomp: false) -> [String] (12260.0) -
データを全て読み込んで、その各行を要素としてもつ配列を返します。 既に EOF に達していれば空配列 [] を返します。
...", "line1,\nline2,\nline3,\n")
File.open("testfile") { |f| p f.readlines } # => ["line1,\n", "line2,\n", "line3,\n"]
File.open("testfile") { |f| p f.readlines(3) } # => ["lin", "e1,", "\n", "lin", "e2,", "\n", "lin", "e3,", "\n"]
File.open("testfile") { |f| p f.readlines(",") } # => ["line1,"......, "\nline2,", "\nline3,", "\n"]
//}
//emlist[例: rsを取り除く(chomp = true)][ruby]{
IO.write("testfile", "line1,\rline2,\r\nline3,\n")
File.open("testfile") { |f| p f.readlines(chomp: true) } # => ["line1,\rline2,", "line3,"]
File.open("testfile") { |f| p f.readlines("\r", chomp: tr......ue) } # => ["line1,", "line2,", "\nline3,\n"]
//}
@see $/, IO#gets... -
IO
# readlines(rs , limit , chomp: false) -> [String] (12260.0) -
データを全て読み込んで、その各行を要素としてもつ配列を返します。 既に EOF に達していれば空配列 [] を返します。
...", "line1,\nline2,\nline3,\n")
File.open("testfile") { |f| p f.readlines } # => ["line1,\n", "line2,\n", "line3,\n"]
File.open("testfile") { |f| p f.readlines(3) } # => ["lin", "e1,", "\n", "lin", "e2,", "\n", "lin", "e3,", "\n"]
File.open("testfile") { |f| p f.readlines(",") } # => ["line1,"......, "\nline2,", "\nline3,", "\n"]
//}
//emlist[例: rsを取り除く(chomp = true)][ruby]{
IO.write("testfile", "line1,\rline2,\r\nline3,\n")
File.open("testfile") { |f| p f.readlines(chomp: true) } # => ["line1,\rline2,", "line3,"]
File.open("testfile") { |f| p f.readlines("\r", chomp: tr......ue) } # => ["line1,", "line2,", "\nline3,\n"]
//}
@see $/, IO#gets... -
IO
. readlines(path , limit , chomp: false , opts={}) -> [String] (12260.0) -
path で指定されたファイルを全て読み込んで、その各行を要素としてもつ配列を返します。
..."line1\nline2,\nline3\n")
IO.readlines("testfile") # => ["line1\n", "line2,\n", "line3\n"]
IO.readlines("testfile", ",") # => ["line1\nline2,", "\nline3\n"]
//}
//emlist[例: rs を取り除く(chomp = true)][ruby]{
IO.write("testfile", "line1,\rline2,\r\nline3,\n")
IO.readl......ines("testfile", chomp: true) # => ["line1,\rline2,", "line3,"]
IO.readlines("testfile", "\r", chomp: true) # => ["line1,", "line2,", "\nline3,\n"]
//}... -
IO
. readlines(path , rs = $ / , chomp: false , opts={}) -> [String] (12260.0) -
path で指定されたファイルを全て読み込んで、その各行を要素としてもつ配列を返します。
..."line1\nline2,\nline3\n")
IO.readlines("testfile") # => ["line1\n", "line2,\n", "line3\n"]
IO.readlines("testfile", ",") # => ["line1\nline2,", "\nline3\n"]
//}
//emlist[例: rs を取り除く(chomp = true)][ruby]{
IO.write("testfile", "line1,\rline2,\r\nline3,\n")
IO.readl......ines("testfile", chomp: true) # => ["line1,\rline2,", "line3,"]
IO.readlines("testfile", "\r", chomp: true) # => ["line1,", "line2,", "\nline3,\n"]
//}... -
IO
. readlines(path , rs , limit , chomp: false , opts={}) -> [String] (12260.0) -
path で指定されたファイルを全て読み込んで、その各行を要素としてもつ配列を返します。
..."line1\nline2,\nline3\n")
IO.readlines("testfile") # => ["line1\n", "line2,\n", "line3\n"]
IO.readlines("testfile", ",") # => ["line1\nline2,", "\nline3\n"]
//}
//emlist[例: rs を取り除く(chomp = true)][ruby]{
IO.write("testfile", "line1,\rline2,\r\nline3,\n")
IO.readl......ines("testfile", chomp: true) # => ["line1,\rline2,", "line3,"]
IO.readlines("testfile", "\r", chomp: true) # => ["line1,", "line2,", "\nline3,\n"]
//}...