ライブラリ
- ビルトイン (231)
-
rexml
/ document (88) -
rexml
/ parsers / pullparser (11) -
rexml
/ parsers / sax2parser (55) -
rexml
/ sax2listener (11) -
rexml
/ streamlistener (11)
クラス
-
REXML
:: Element (11) -
REXML
:: Instruction (66) -
REXML
:: Parsers :: PullEvent (11) -
REXML
:: Parsers :: SAX2Parser (55) - RubyVM (11)
-
RubyVM
:: InstructionSequence (214) - TracePoint (6)
モジュール
-
REXML
:: SAX2Listener (11) -
REXML
:: StreamListener (11)
キーワード
- == (11)
-
INSTRUCTION
_ NAMES (11) - Instruction (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 6 . 0 (6) -
absolute
_ path (11) -
base
_ label (11) - clone (11)
- compile (11)
-
compile
_ file (11) -
compile
_ option (11) - content (11)
- disasm (22)
- disassemble (22)
- eval (11)
-
first
_ lineno (11) - inspect (11)
- instruction? (11)
-
instruction
_ sequence (6) - instructions (11)
- label (11)
- listen (55)
-
load
_ from _ binary (9) -
load
_ from _ binary _ extra _ data (9) - new (22)
-
node
_ type (11) - of (11)
- path (11)
-
processing
_ instruction (11) -
rexml
/ parsers / pullparser (11) -
rexml
/ parsers / sax2parser (11) -
rexml
/ parsers / streamparser (11) -
rexml
/ parsers / ultralightparser (11) - target (11)
-
to
_ a (11) -
to
_ binary (9)
検索結果
先頭5件
-
REXML
:: StreamListener # instruction(name , instruction) -> () (27526.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... -
RubyVM
:: INSTRUCTION _ NAMES -> [String] (15301.0) -
RubyVM の命令シーケンスの名前の一覧を返します。
...
RubyVM の命令シーケンスの名前の一覧を返します。
@see RubyVM::InstructionSequence... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (12607.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...script_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......("puts 'hello'")
end
//}
@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。... -
REXML
:: Element # instructions -> [REXML :: Instraction] (12316.0) -
すべての instruction 子ノードの配列を返します。
...すべての instruction 子ノードの配列を返します。
返される配列は freeze されます。... -
REXML
:: Parsers :: PullEvent # instruction? -> bool (12301.0) -
XML処理命令なら真を返します。
XML処理命令なら真を返します。 -
REXML
:: SAX2Listener # processing _ instruction(target , data) -> () (12301.0) -
XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
...XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
@param target ターゲット名が文字列で渡されます
@param data 処理命令の内容が文字列で渡されます... -
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (12300.0) -
RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
...
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... -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (12206.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
...の 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (12206.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...て返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッ......ry で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary("extr......合上改行しているが実際は改行はない
# => "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\x00\x00\x00\x01
# \x00\x00\x00\x00\x0... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (12200.0) -
バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。
...埋め込まれたextra_dataを取り出します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}
@see RubyVM::InstructionSequence#to_binary... -
REXML
:: Instruction (12046.0) -
XML 処理命令(XML Processing Instruction, XML PI)を表すクラス。
...XML 処理命令(XML Processing Instruction, XML PI)を表すクラス。
XML 処理命令 とは XML 文書中の <? と ?> で挟まれた部分のことで、
アプリケーションへの指示を保持するために使われます。
XML 宣言(文書先頭の <?xml version=... ?>)はXML処......list[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"text/css\" href=\"st...