ライブラリ
- ビルトイン (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) -
NEWS for Ruby 2
. 0 . 0 (11) -
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? (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 / ultralightparser (11) - target (11)
-
to
_ a (11) -
to
_ binary (9)
検索結果
先頭5件
-
REXML
:: Instruction (24052.0) -
XML 処理命令(XML Processing Instruction, XML PI)を表すクラス。
...処理命令(XML Processing Instruction, XML PI)を表すクラス。
XML 処理命令 とは XML 文書中の <? と ?> で挟まれた部分のことで、
アプリケーションへの指示を保持するために使われます。
XML 宣言(文書先頭の <?xml version=... ?>)はXML処理......を持っています。
//emlist[][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 # =... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (15507.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
:: SAX2Listener # processing _ instruction(target , data) -> () (15401.0) -
XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
...XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
@param target ターゲット名が文字列で渡されます
@param data 処理命令の内容が文字列で渡されます... -
RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence (12600.0) -
引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。
@param file......tions コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
# /tmp/hello.rb
puts "Hello, world!"
# i......rb
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb")
# => <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>
@see RubyVM::InstructionSequence.compile... -
REXML
:: StreamListener # instruction(name , instruction) -> () (12526.0) -
XML処理命令(PI)をパースしたときに呼び出されるコールバックメソッドです。
...(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
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (12500.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... -
REXML
:: Element # instructions -> [REXML :: Instraction] (12416.0) -
すべての instruction 子ノードの配列を返します。
...すべての instruction 子ノードの配列を返します。
返される配列は freeze されます。... -
RubyVM
:: INSTRUCTION _ NAMES -> [String] (12401.0) -
RubyVM の命令シーケンスの名前の一覧を返します。
...RubyVM の命令シーケンスの名前の一覧を返します。
@see RubyVM::InstructionSequence... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (12400.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... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (12306.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...れたiseqのデータを文字列として返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.......load_from_binary_extra_data メソッドでこの文字列にアクセス出来ます。
注意: 変換後のバイナリデータはポータブルではありません。 to_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキ......pile('num = 1 + 2')
iseq.to_binary("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-... -
REXML
:: Parsers :: PullEvent # instruction? -> bool (12301.0) -
XML処理命令なら真を返します。
XML処理命令なら真を返します。