種類
- インスタンスメソッド (19)
- 特異メソッド (6)
- クラス (1)
クラス
-
IRB
:: Context (12) -
IRB
:: ExtendCommand :: Help (1) -
IRB
:: ExtendCommand :: Load (1) -
IRB
:: ExtendCommand :: Source (1) -
IRB
:: Inspector (1) -
IRB
:: OutputMethod (1) -
IRB
:: StdioOutputMethod (1) - XMP (2)
モジュール
- IRB (2)
-
IRB
:: ExtendCommandBundle (2) - Kernel (1)
キーワード
- Context (1)
- Inspector (1)
-
def
_ extend _ command (1) -
def
_ inspector (1) -
eval
_ history (1) -
eval
_ history= (1) - execute (3)
-
history
_ file (1) -
inspect
_ mode (1) -
irb
_ load (1) - new (2)
- print (1)
- printn (1)
- puts (1)
-
save
_ history (1) -
save
_ history= (1) - start (1)
-
use
_ readline (1) -
use
_ readline? (1) - verbose (1)
- verbose= (1)
- verbose? (1)
- xmp (1)
検索結果
先頭5件
-
IRB
:: Context . new(irb , workspace = nil , input _ method = nil , output _ method = nil) -> IRB :: Context (931.0) -
自身を初期化します。
...身を初期化します。
@param irb IRB::Irb オブジェクトを指定します。
@param workspace IRB::WorkSpace オブジェクトを指定します。省略し
た場合は新しく作成されます。
@param input_method String、IRB::InputMethod のサブクラスの......ジェクト、nil のいずれかを指定します。
@param output_method IRB::OutputMethod のサブクラスのオブジェクト
を指定します。省略した場合は
IRB::StdioOutputMethod オブジェクトが新しく
作... -
IRB
:: ExtendCommand :: Load # execute(file _ name , priv = nil) -> nil (610.0) -
ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実 行します。
...ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実
行します。
Kernel.#load と異なり、path の内容を irb で一行ずつタイプしたかの
ように、irb 上で一行ずつ評価されます。
@param file_name ファイル名を文... -
IRB
:: Context # eval _ history -> Integer | nil (391.0) -
実行結果の履歴の最大保存件数を Integer か nil で返します。
...履歴の最大保存件数を Integer か nil で返します。
@return 履歴の最大保存件数を Integer か nil で返します。0 を返し
た場合は無制限に保存します。nil を返した場合は追加の保存は行いません。
@see IRB::Context#eval_history=... -
IRB
:: Context # save _ history -> Integer | nil (391.0) -
履歴の最大保存件数を Integer か nil で返します。
...履歴の最大保存件数を Integer か nil で返します。
@return 履歴の最大保存件数を Integer か nil で返します。0 以下や
nil を返した場合は追加の保存は行いません。
@see lib:irb#history... -
IRB
:: Context # history _ file -> String | nil (343.0) -
履歴ファイルのパスを返します。
...履歴ファイルのパスを返します。
@return 履歴ファイルのパスを String か nil で返します。nil を返し
た場合は、~/.irb_history に履歴が保存されます。
@see lib:irb#history... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (343.0) -
RI から Ruby のドキュメントを参照します。
...RI から Ruby のドキュメントを参照します。
irb(main):001:0> help String#match
...
@param names 参照したいクラス名やメソッド名などを文字列で指定します。
names を指定しなかった場合は、RI を対話的なモードで起動します。メソ......トの検索が行えます。入力のタブ補完をする
事ができます。また、空行を入力する事で irb のプロンプトに戻る事ができま
す。
irb(main):001:0> help
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line... -
IRB
:: Context # use _ readline -> bool | nil (328.0) -
readline を使うかどうかを返します。
...inf-ruby-mode 以外で readline ライブラリを利用しようとする (デフォルト)
動作を変更するためには .irbrc ファイル中で IRB.conf[:USE_READLINE] の設
定や irb 起動時に --readline オプション、--noreadline オプションの指定
を行います。... -
IRB
:: Context # use _ readline? -> bool | nil (328.0) -
readline を使うかどうかを返します。
...inf-ruby-mode 以外で readline ライブラリを利用しようとする (デフォルト)
動作を変更するためには .irbrc ファイル中で IRB.conf[:USE_READLINE] の設
定や irb 起動時に --readline オプション、--noreadline オプションの指定
を行います。... -
IRB
:: Context # verbose -> bool | nil (325.0) -
標準出力に詳細なメッセージを出力するように設定されているかどうかを返し ます。
...ます。
IRB::Context#verbose? とは別のメソッドである事に注意してください。
@return 詳細なメッセージを出力するように設定されている場合は true を返
します。そうでない場合は false か nil を返します。
@see IRB::Context#ve... -
IRB
:: Context # verbose? -> bool | nil (325.0) -
標準出力に詳細なメッセージを出力するかどうかを返します。
...行っていた場合(IRB::Context#verbose が true か false を返す
場合)は設定した通りに動作します。設定を行っていない場合は、ファイルを指
定して irb を実行した場合などに true を返します。
@see IRB::Context#verbose, IRB::Context#verbose=... -
IRB
. start(ap _ path = nil) -> () (310.0) -
IRB を初期化して、トップレベルの irb を開始します。
...
IRB を初期化して、トップレベルの irb を開始します。
@param ap_path irb コマンドのパスを指定します。... -
IRB
. Inspector(inspect , init = nil) -> IRB :: Inspector (307.0) -
IRB::Inspector オブジェクトを生成します。
...
IRB::Inspector オブジェクトを生成します。
@param inspect 実行結果の出力のための手続きオブジェクトを指定します。
@param init inspect_mode の初期化のための手続きオブジェクトを指定します。
あらかじめ require が必要... -
IRB
:: Context # inspect _ mode -> object | nil (307.0) -
実行結果の出力方式を返します。
...実行結果の出力方式を返します。
@see IRB::Context#inspect_mode=... -
IRB
:: ExtendCommand :: Source # execute(file _ name) -> nil (307.0) -
現在の irb インタプリタ上で、 Ruby スクリプト path を評価します。
...現在の irb インタプリタ上で、 Ruby スクリプト path を評価します。
path の内容を irb で一行ずつタイプしたかのように、irb 上で一行ずつ評価
されます。$" は更新されず、何度でも実行し直す事ができます。
@param file_name フ... -
IRB
:: ExtendCommandBundle # irb _ load(*opts , &b) -> nil (307.0) -
現在の irb に関する IRB::Context に対して irb_load コマンドを実行 します。
...現在の irb に関する IRB::Context に対して irb_load コマンドを実行
します。
@see IRB::ExtendCommand::Load#execute... -
IRB
:: ExtendCommandBundle . def _ extend _ command(cmd _ name , cmd _ class , load _ file = nil , *aliases) -> object (307.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 のいずれか
を指定し... -
IRB
:: Inspector . def _ inspector(key , arg = nil) { |v| . . . } -> object (307.0) -
新しい実行結果の出力方式を定義します。
...新しい実行結果の出力方式を定義します。
@param key conf.inspect_mode や IRB.conf[:INSPECT_MODE] に指定するキー
オブジェクトを指定します。配列を指定した場合は配列中の要素全
てが対象になります。
@param arg ブ......ロックを指定しない場合には、実行結果の出力のための手続きオ
ブジェクトを指定します。
例.
# .irbrc
IRB::Inspector.def_inspector([:test]){ |v| v.to_s * 2 }
$ irb --inspect test
irb(main):001:0> :abc # => abcabc
@see lib:irb#inspect_mode... -
IRB
:: OutputMethod # printn(*objs) -> nil (307.0) -
各 obj を self に出力し、最後に改行を出力します。
各 obj を self に出力し、最後に改行を出力します。
@param objs 任意のオブジェクトを指定します。 -
IRB
:: StdioOutputMethod # print(*objs) -> nil (307.0) -
引数を標準出力に出力します。
引数を標準出力に出力します。
@param objs 任意のオブジェクトを指定します。 -
Kernel
# xmp(exps , bind = nil) -> XMP (307.0) -
引数 exps で指定されたRuby のソースコードとその実行結果を、標準出力に行 ごとに交互に表示します。
引数 exps で指定されたRuby のソースコードとその実行結果を、標準出力に行
ごとに交互に表示します。
@param exps 評価するRuby のソースコードを文字列で指定します。
@param bind Binding オブジェクトを指定します。省略した場合は、最
後に実行した XMP#puts、Kernel#xmp の
Binding を使用します。まだ何も実行していない場合は
Object::TOPLEVEL_BINDING を使用します。 -
XMP
# puts(exps) -> nil (307.0) -
引数 exps で指定されたRuby のソースコードとその実行結果を、標準出力に行 ごとに交互に表示します。
引数 exps で指定されたRuby のソースコードとその実行結果を、標準出力に行
ごとに交互に表示します。
@param exps 評価するRuby のソースコードを文字列で指定します。 -
XMP
. new(bind = nil) -> XMP (307.0) -
自身を初期化します。
自身を初期化します。
@param bind Binding オブジェクトを指定します。省略した場合は、最
後に実行した XMP#puts、Kernel#xmp の
Binding を使用します。まだ何も実行していない場合は
Object::TOPLEVEL_BINDING を使用します。
@see XMP#puts -
IRB
:: Context (58.0) -
irb の設定を扱うためのクラスです。
...irb の設定を扱うためのクラスです。
irb 中で conf コマンドの戻り値や .irbrc で IRB.conf を操作する事で設定
を変更します。irb の起動後は IRB.conf の内容を更新しても変更の内容は反
映されない事に注意してください。
なお......、.irbrc 中に記述できる以下の設定値については、IRB::Context
オブジェクトのメソッドとして操作できません。
: IRB.conf[:AT_EXIT]
irb の終了時(サブ irb を含みません)に本項目に設定された Proc オ
ブジェクトを実行します。ブ......ロック引数には何も渡されません。
デフォルト値は [] です。
: IRB.conf[:CONTEXT_MODE]
新しいワークスペースを作成した時(サブ irb の起動や pushws した時)に、
ワークスペースに関連する Binding オブジェクトの作成方法を... -
IRB
:: Context # eval _ history=(val) (40.0) -
実行結果の履歴の最大保存件数を val に設定します。
...実行結果の履歴の最大保存件数を val に設定します。
.irbrc ファイル中で IRB.conf[:EVAL_HISTORY] を設定する事でも同様の事が
行えます。
@param val 実行結果の履歴の最大保存件数を Integer か nil で指定し
ます。0 を指定......た場合は無制限に履歴を保存します。現在の値よ
りも小さい値を指定した場合は履歴がその件数に縮小されます。
nil を指定した場合は履歴の追加がこれ以上行われなくなります。
@see IRB::Context#eval_history... -
IRB
:: Context # verbose=(val) (40.0) -
標準出力に詳細なメッセージを出力するかどうかを val に設定します。
...メッセージを出力するかどうかを val に設定します。
.irbrc ファイル中で IRB.conf[:VERBOSE] を設定する事でも同様の操作が行え
ます。
false や nil を指定した場合でも、IRB::Context#verbose? が true を
返す場合は詳細なメッセージを......出力する事に注意してください。
@param val true を指定した場合、詳細なメッセージを出力します。false や
nil を指定した場合、詳細なメッセージを出力しません。
@see IRB::Context#verbose, IRB::Context#verbose?... -
IRB
:: Context # save _ history=(val) (22.0) -
履歴の最大保存件数を val に設定します。
...履歴の最大保存件数を val に設定します。
.irbrc ファイル中で IRB.conf[:SAVE_HISTORY] を設定する事でも同様の事が
行えます。
@param val 履歴の最大保存件数を Integer で指定します。0 以下や
nil を返した場合は追加の保存......は行いません。現在の件数より小さ
い値を設定した場合は、最新の履歴から指定した件数分のみが保存
されます。
@see lib:irb#history...