438件ヒット
[1-100件を表示]
(0.047秒)
ライブラリ
- ビルトイン (55)
- irb (11)
-
irb
/ cmd / help (11) -
irb
/ cmd / load (22) -
irb
/ context (88) -
irb
/ ext / history (22) -
irb
/ ext / math-mode (4) -
irb
/ ext / save-history (33) -
irb
/ ext / use-loader (11) -
irb
/ extend-command (11) -
irb
/ inspector (22) -
irb
/ output-method (22) - pathname (22)
クラス
-
IRB
:: Context (136) -
IRB
:: ExtendCommand :: Help (11) -
IRB
:: ExtendCommand :: Load (11) -
IRB
:: ExtendCommand :: Source (11) -
IRB
:: Inspector (11) -
IRB
:: OutputMethod (11) -
IRB
:: StdioOutputMethod (11) - Pathname (22)
-
RubyVM
:: InstructionSequence (22) - Thread (11)
モジュール
- IRB (22)
-
IRB
:: ExtendCommandBundle (22) - Kernel (14)
-
RubyVM
:: AbstractSyntaxTree (8)
キーワード
-
$ -K (7) -
$ KCODE (7) - Context (11)
- Inspector (11)
-
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Ruby用語集 (11)
-
absolute
_ path (11) - backtrace (11)
-
compile
_ file (11) -
def
_ extend _ command (11) -
def
_ inspector (11) -
eval
_ history (11) -
eval
_ history= (11) - execute (33)
- glob (22)
-
history
_ file (11) -
inspect
_ mode (11) -
irb
/ completion (11) -
irb
/ xmp (11) -
irb
_ load (11) -
math
_ mode= (4) - new (11)
- of (8)
- print (11)
- printn (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11) -
save
_ history (11) -
save
_ history= (11) - start (11)
-
use
_ readline (11) -
use
_ readline? (11) - verbose (11)
- verbose= (11)
- verbose? (11)
検索結果
先頭5件
-
irb (39772.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:......) 式を .irbrc に記述すると、
irb コマンドのオプションを指定したのと同じ効果が得られます。
IRB.conf[:AUTO_INDENT] = false
IRB.conf[:BACK_TRACE_LIMIT] = 16
IRB.conf[:DEBUG_LEVEL] = 1
IRB.conf[:ECHO] = nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY... -
IRB
. start(ap _ path = nil) -> () (17139.0) -
IRB を初期化して、トップレベルの irb を開始します。
...
IRB を初期化して、トップレベルの irb を開始します。
@param ap_path irb コマンドのパスを指定します。... -
IRB
:: ExtendCommandBundle # irb _ load(*opts , &b) -> nil (9256.0) -
現在の irb に関する IRB::Context に対して irb_load コマンドを実行 します。
...現在の irb に関する IRB::Context に対して irb_load コマンドを実行
します。
@see IRB::ExtendCommand::Load#execute... -
IRB
. Inspector(inspect , init = nil) -> IRB :: Inspector (9218.0) -
IRB::Inspector オブジェクトを生成します。
...
IRB::Inspector オブジェクトを生成します。
@param inspect 実行結果の出力のための手続きオブジェクトを指定します。
@param init inspect_mode の初期化のための手続きオブジェクトを指定します。
あらかじめ require が必要... -
irb
/ completion (6082.0) -
irb の completion 機能を提供するライブラリです。
...irb の completion 機能を提供するライブラリです。
=== 使い方
$ irb -r irb/completion
とするか, ~/.irbrc 中に
require "irb/completion"
を入れてください.
irb実行中に require "irb/completion" してもよいです.
irb 実行中に [Tab] を押すとコ......全に補完します.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Objec......foo.to_a
foo.dup foo.kind_of? foo.to_s
foo.eql? foo.method foo.type
foo.equal? foo.methods foo.untaint
foo.extend foo.nil?
foo.freeze foo.private_methods... -
irb
/ xmp (6058.0) -
Ruby のソースコードとその実行結果を、行ごとに交互に表示するためのライブ ラリです。irb を実行しなくても、使用することが出来ます。
...Ruby のソースコードとその実行結果を、行ごとに交互に表示するためのライブ
ラリです。irb を実行しなくても、使用することが出来ます。
実行結果を得るためには、Kernel#xmp と、XMP#puts を使った方
法があります。どちら......のように Ruby のソースコードを文字列として渡
す事で実行結果を標準出力に表示します。
$ cat t.rb
require "irb/xmp"
xmp <<END
foo = 1
foo
END
$ ruby t.rb
foo = 1
==>1
foo
==>1
=== XMP インスタンス(XMP#puts)を使って実行結......ています
(IRB::Context#prompt_mode で選択できる :XMP モードはそのために用
意されています)。そのため、irb プロンプト中で使用可能なコマンドを実行し
た時に実行結果を得る事ができる点に注意してください。(例. nil が返る事... -
IRB
:: Context . new(irb , workspace = nil , input _ method = nil , output _ method = nil) -> IRB :: Context (3553.0) -
自身を初期化します。
...身を初期化します。
@param irb IRB::Irb オブジェクトを指定します。
@param workspace IRB::WorkSpace オブジェクトを指定します。省略し
た場合は新しく作成されます。
@param input_method String、IRB::InputMethod のサブクラスの......オブジェクト、nil のいずれかを指定します。
@param output_method IRB::OutputMethod のサブクラスのオブジェクト
を指定します。省略した場合は
IRB::StdioOutputMethod オブジェクトが新しく... -
IRB
:: Context (3232.0) -
irb の設定を扱うためのクラスです。
...irb の設定を扱うためのクラスです。
irb 中で conf コマンドの戻り値や .irbrc で IRB.conf を操作する事で設定
を変更します。irb の起動後は IRB.conf の内容を更新しても変更の内容は反
映されない事に注意してください。
なお......、.irbrc 中に記述できる以下の設定値については、IRB::Context
オブジェクトのメソッドとして操作できません。
: IRB.conf[:AT_EXIT]
irb の終了時(サブ irb を含みません)に本項目に設定された Proc オ
ブジェクトを実行します。ブ...... irb を含みます)に本項目に設定された Proc オブ
ジェクトを実行します。ブロック引数には IRB::Context が渡されます。
そのため、サブ irb の設定をまとめて実行するのに使用します。
デフォルト値は nil です。
lib:irb#co... -
IRB
:: ExtendCommand :: Load # execute(file _ name , priv = nil) -> nil (3230.0) -
ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実 行します。
...ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実
行します。
Kernel.#load と異なり、path の内容を irb で一行ずつタイプしたかの
ように、irb 上で一行ずつ評価されます。
@param file_name ファイル名を文... -
IRB
:: ExtendCommandBundle . def _ extend _ command(cmd _ name , cmd _ class , load _ file = nil , *aliases) -> object (3141.0) -
irb に cmd_name で指定したメソッドが実行できるように拡張します。
...
irb に cmd_name で指定したメソッドが実行できるように拡張します。
@param cmd_name メソッド名を Symbol か文字列で指定します。
cmd_class で指定するクラスの execute メソッドとして定
義してある必要があ......されたクラス名を Symbol、
String、Class のいずれかで指定します。
なお、このクラスは IRB::ExtendCommand 以下で定義
する必要があります。
@param load_file 指定したメソッドが定義されたファ......しま
す。複数指定する事ができます。フラグは
IRB::ExtendCommandBundle::NO_OVERRIDE、
IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_ONLY、
IRB::ExtendCommandBundle::OVERRIDE_ALL のいずれか
を指定し...