ライブラリ
- ビルトイン (349)
- csv (33)
-
io
/ console (22) -
irb
/ context (33) -
net
/ http (22) - shell (24)
-
shell
/ builtin-command (12) -
shell
/ command-processor (24) -
shell
/ filter (24) - timeout (19)
-
webrick
/ httpstatus (11)
クラス
-
ARGF
. class (187) - Array (19)
- CSV (33)
- IO (22)
-
IRB
:: Context (33) - Shell (24)
-
Shell
:: CommandProcessor (24) -
Shell
:: Echo (12) -
Shell
:: Filter (24) - String (11)
キーワード
- HTTPMultipleChoice (11)
- HTTPMultipleChoices (11)
- MultipleChoices (11)
- Rubyの起動 (11)
- cat (18)
- each (6)
-
each
_ char (22) -
each
_ codepoint (22) - echo= (22)
- echo? (22)
- exec (44)
- file (11)
- filename (11)
- filter (33)
- getbyte (11)
- getc (11)
- gets (33)
- glob (18)
-
inplace
_ mode (11) - irb (11)
- new (6)
- pack (19)
- pack テンプレート文字列 (11)
- path (11)
- read (11)
- readbyte (11)
- readchar (11)
- skip (11)
- spawn (44)
- system (44)
- tee (18)
- timeout (19)
- unpack (11)
検索結果
先頭5件
-
irb (26108.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...irb は Interactive Ruby の略です。
irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
=== irb の使い方
Ruby さえ知っていれば irb を使うのは簡単です。
irb コマンドを実行すると、以下のようなプロン......。
$ irb
irb(main):001:0>
あとは Ruby の式を入力するだけで、その式が実行され、結果が表示されます。
irb(main):001:0> 1+2
3
irb(main):002:0> class Foo
irb(main):003:1> def foo
irb(main):004:2> print 1
irb(main):005:2> end
irb(main):006:1>......-r と同じ
-I ruby -I と同じ
-U ruby -U と同じ
-E enc ruby -E と同じ
--verbose これから実行する行を表示する
--noverbose これから実行する行を表示しない (デフォルト)
--echo 実... -
Shell
:: Filter # echo(*strings) -> Shell :: Filter (24325.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...ilter オブジェクトを返します.
@param strings シェルコマンド echo に与える引数を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(fi......le).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}... -
Shell
# echo(*strings) -> Shell :: Filter (21325.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...ilter オブジェクトを返します.
@param strings シェルコマンド echo に与える引数を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(fi......le).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}... -
Shell
:: CommandProcessor # echo(*strings) -> Shell :: Filter (21325.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...ilter オブジェクトを返します.
@param strings シェルコマンド echo に与える引数を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(fi......le).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}... -
IRB
:: Context # echo -> bool (21208.0) -
irb のプロンプトでの評価結果を表示するかどうかを返します。
...
irb のプロンプトでの評価結果を表示するかどうかを返します。
デフォルト値は false です。
@see IRB::Context#echo=... -
WEBrick
:: HTTPStatus :: MultipleChoices (21000.0) -
HTTP のステータスコード 300 Multiple Choices を表すクラスです。
...HTTP のステータスコード 300 Multiple Choices を表すクラスです。... -
Net
:: HTTPMultipleChoice (18000.0) -
Alias of Net::HTTPMultipleChoices
...Alias of Net::HTTPMultipleChoices... -
Net
:: HTTPMultipleChoices (18000.0) -
HTTP レスポンス 300 (Multiple Choices) を表現するクラスです。
...HTTP レスポンス 300 (Multiple Choices) を表現するクラスです。
詳しくは 7231 Section 6.4.1 を見てください。... -
ARGF
. class # inplace _ mode -> String | nil (15324.0) -
c:ARGF#inplace で書き換えるファイルのバックアップに付加される拡 張子を返します。拡張子が設定されていない場合は空文字列を返します。イン プレースモードでない場合は nil を返します。
...#inplace で書き換えるファイルのバックアップに付加される拡
張子を返します。拡張子が設定されていない場合は空文字列を返します。イン
プレースモードでない場合は nil を返します。
Ruby 起動時の -i オプション や ARGF.cl......ass#inplace_mode= で設定します。
例:
# $ echo "test" > test.txt
# $ ruby -i.bak test.rb test.txt
# $ cat test.txt # => "TEST"
# $ cat test.txt.bak # => "test"
# test.rb
ARGF.inplace_mode # => ".bak"
ARGF.each_line {|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 # filename -> String (12218.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"... -
ARGF
. class # file -> IO (12212.0) -
現在開いている処理対象の File オブジェクト(または IO オブジェ クト)を返します。
...開いている処理対象の File オブジェクト(または IO オブジェ
クト)を返します。
$ echo "foo" > foo
$ echo "bar" > bar
$ ruby argf.rb foo bar
ARGF.file # => #<File:foo>
ARGF.read(5) # => "foo\nb"
ARGF.file # => #<File:bar>
ARGFが現在開いて......いる処理対象が標準入力の場合、$stdin を返します。...