92件ヒット
[1-92件を表示]
(0.053秒)
ライブラリ
- ビルトイン (75)
-
irb
/ extend-command (11) - shell (6)
クラス
- Class (22)
- Module (22)
-
RubyVM
:: InstructionSequence (9) - Shell (6)
モジュール
-
IRB
:: ContextExtender (11)
オブジェクト
- main (22)
キーワード
- debug= (6)
-
define
_ method (22) -
install
_ extend _ commands (11) -
load
_ from _ binary (9) - new (44)
検索結果
先頭5件
-
Class
. new(superclass = Object) -> Class (7.0) -
新しく名前の付いていない superclass のサブクラスを生成します。
...キストでブロックを実行します。以下のコードと同じです。
//emlist[例][ruby]{
klass = Class.new(superclass)
klass.module_eval {|m|
# ...
}
klass
//}
この場合も生成したクラスを返します。
ブロックの実行は Class#initialize が行います。
@para... -
Class
. new(superclass = Object) {|klass| . . . } -> Class (7.0) -
新しく名前の付いていない superclass のサブクラスを生成します。
...キストでブロックを実行します。以下のコードと同じです。
//emlist[例][ruby]{
klass = Class.new(superclass)
klass.module_eval {|m|
# ...
}
klass
//}
この場合も生成したクラスを返します。
ブロックの実行は Class#initialize が行います。
@para... -
IRB
:: ContextExtender . install _ extend _ commands -> object (7.0) -
定義済みの拡張を読み込みます。
...定義済みの拡張を読み込みます。
IRB::Context で以下のメソッドが利用できるようになります。
* eval_history=
* use_tracer=
* math_mode=
* use_loader=
* save_history=
irb/extend-command が require された時にライブラリ内部で自動的
に実行さ... -
Module
. new -> Module (7.0) -
名前の付いていないモジュールを新しく生成して返します。
...ブロックに渡し、
モジュールのコンテキストでブロックを実行します。
//emlist[例][ruby]{
mod = Module.new
mod.module_eval {|m|
# ...
}
mod
//}
と同じです。
ブロックの実行は Module#initialize が行います。
ブロックを与えた場合も生成... -
Module
. new {|mod| . . . } -> Module (7.0) -
名前の付いていないモジュールを新しく生成して返します。
...ブロックに渡し、
モジュールのコンテキストでブロックを実行します。
//emlist[例][ruby]{
mod = Module.new
mod.module_eval {|m|
# ...
}
mod
//}
と同じです。
ブロックの実行は Module#initialize が行います。
ブロックを与えた場合も生成... -
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (7.0) -
RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
...りません。自分が変換したバイナリデータを使うべきです。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary
RubyVM::InstructionSequence.load_from_binary(binary).eval # => 3
//}
@see RubyVM::InstructionSequence#to_binary... -
Shell
. debug=(val) (7.0) -
デバッグ用のフラグを設定します。
...デバッグ用のフラグを設定します。
@param val bool 値や整数値を指定します。詳細は下記を参照してください。
# debug: true -> normal debug
# debug: 1 -> eval definition debug
# debug: 2 -> detail inspect debug... -
main
. define _ method(name) { . . . } -> Symbol (7.0) -
インスタンスメソッド name を Object に定義します。
...ブロックを与えた場合、定義したメソッドの実行時にブロックが
Object インスタンスの上で BasicObject#instance_eval されます。
@param name String または Symbol を指定します。
@param method Proc、Method あるいは UnboundMethod の... -
main
. define _ method(name , method) -> Symbol (7.0) -
インスタンスメソッド name を Object に定義します。
...ブロックを与えた場合、定義したメソッドの実行時にブロックが
Object インスタンスの上で BasicObject#instance_eval されます。
@param name String または Symbol を指定します。
@param method Proc、Method あるいは UnboundMethod の...