221件ヒット
[1-100件を表示]
(0.151秒)
ライブラリ
- ビルトイン (101)
-
rexml
/ document (36) -
rexml
/ parsers / sax2parser (60) -
rexml
/ sax2listener (12) -
rexml
/ streamlistener (12)
クラス
-
REXML
:: Instruction (36) -
REXML
:: Parsers :: SAX2Parser (60) -
RubyVM
:: InstructionSequence (94) - TracePoint (7)
モジュール
-
REXML
:: SAX2Listener (12) -
REXML
:: StreamListener (12)
キーワード
- == (12)
-
absolute
_ path (12) -
base
_ label (12) - content= (12)
- disasm (12)
- disassemble (12)
- inspect (12)
-
instruction
_ sequence (7) - label (12)
- listen (60)
- path (12)
-
processing
_ instruction (12) - target= (12)
-
to
_ binary (10)
検索結果
先頭5件
-
REXML
:: StreamListener # instruction(name , instruction) -> () (27427.0) -
XML処理命令(PI)をパースしたときに呼び出されるコールバックメソッドです。
...す。
@param name ターゲット名が文字列で渡されます
@param instruction 処理命令の内容が文字列で渡されます
=== 例
<?xml-stylesheet type="text/css" href="style.css"?>
というPIに対し
name: "xml-stylesheet"
instruction: " type=\"text/css\" href=\"style.css... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (15414.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...pt_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval("put......s 'hello'")
end
//}
@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。... -
REXML
:: SAX2Listener # processing _ instruction(target , data) -> () (12214.0) -
XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
...XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
@param target ターゲット名が文字列で渡されます
@param data 処理命令の内容が文字列で渡されます... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (9113.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...ます。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッドでこ......。 to_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_b......inary("extra_data")
# ※表示の都合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00\x00\x16\x02\x00\x00\n\x00\x00\x00\x01
# \x00\x00\x00\x03\x00\x00\x00\x05\x00\x00\x00\x84\x01\x00\x00\x88\x01\x00
# \x00\x02\x02\x00\x00x86_64-darwin15\x00*\x00\x00\x00\x00... -
REXML
:: Instruction # content=(value) (9107.0) -
XML 処理命令の内容を変更します。
...XML 処理命令の内容を変更します。
@param value 新たなデータ(文字列)... -
REXML
:: Instruction # target=(value) (9107.0) -
XML 処理命令のターゲットを value に変更します。
...XML 処理命令のターゲットを value に変更します。
@param value 新たなターゲット(文字列)... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (9107.0) -
self が表す命令シーケンスの絶対パスを返します。
...:InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::Instr......uctionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # inspect -> String (9107.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # path -> String (9107.0) -
self が表す命令シーケンスの相対パスを返します。
...:InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::Instr......uctionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"
@see RubyVM::InstructionSequence#absolute_path...