40件ヒット
[1-40件を表示]
(0.051秒)
種類
- ライブラリ (16)
- 特異メソッド (12)
- インスタンスメソッド (12)
ライブラリ
-
irb
/ context (12) -
irb
/ inspector (12)
クラス
-
IRB
:: Context (12) -
IRB
:: Inspector (12)
キーワード
-
def
_ inspector (12) - irb (12)
-
irb
/ ext / math-mode (4)
検索結果
先頭4件
-
IRB
:: Context # inspect _ mode -> object | nil (18208.0) -
実行結果の出力方式を返します。
...実行結果の出力方式を返します。
@see IRB::Context#inspect_mode=... -
IRB
:: Inspector . def _ inspector(key , arg = nil) { |v| . . . } -> object (125.0) -
新しい実行結果の出力方式を定義します。
...aram key conf.inspect_mode や IRB.conf[:INSPECT_MODE] に指定するキー
オブジェクトを指定します。配列を指定した場合は配列中の要素全
てが対象になります。
@param arg ブロックを指定する場合には、inspect_mode の初期化......ロックを指定しない場合には、実行結果の出力のための手続きオ
ブジェクトを指定します。
例.
# .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
/ ext / math-mode (44.0) -
irb コマンドで実行結果を Object#inspect の代わりに Object#to_s した結果で表示するためのサブライブラリです。
...行結果を Object#inspect の代わりに
Object#to_s した結果で表示するためのサブライブラリです。
conf.math_mode か IRB.conf[:MATH_MODE] に true を設定する事で使用できま
す。ただし、inspect_mode が設定されていた場合は inspect_mode が優先さ... -
irb (42.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...il
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:MATH_MODE] = false
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMPT_M......# サブ irb を起動
irb#1(main):001:0> x # x を表示
NameError: undefined local variable or method `x' for main:Object
from (irb#1):1:in `Kernel#binding'
起動時のインタプリタでローカル変数 x を定義しましたが、
「irb」でサブ irb......ところが、 irb ではエラーになります。
irb(main):001:0> eval "foo"
NameError (undefined local variable or method `foo' for main:Object)
irb(main):002:0> foo = 0
この違いは、Ruby スクリプト と irb の構文解析のタイミングの差に起因します。 Ruby は......il
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:IRB_RC] = nil
IRB.conf[:PROMPT] = {....}
IRB.conf[:PROMPT_MODE] = :DEFAULT
IRB.conf[:SIN...