99件ヒット
[1-99件を表示]
(0.030秒)
種類
- インスタンスメソッド (44)
- 定数 (33)
- クラス (22)
クラス
-
Psych
:: Handler (11) -
Psych
:: Parser (33) -
Psych
:: Stream (22) -
Psych
:: Visitors :: YAMLTree (11)
キーワード
- Emitter (11)
- UTF16BE (11)
- UTF16LE (11)
- UTF8 (11)
-
start
_ stream (11)
検索結果
先頭5件
- Psych
:: Stream # start(encoding = Psych :: Nodes :: Stream :: UTF8) -> Psych :: Stream - Psych
:: Stream # start(encoding = Psych :: Nodes :: Stream :: UTF8) {|em| . . . } -> Psych :: Stream - Psych
:: Visitors :: YAMLTree # start(encoding = Nodes :: Stream :: UTF8) -> Psych :: Nodes :: Stream - Psych
:: Stream - Psych
:: Handler # start _ stream(encoding) -> ()
-
Psych
:: Stream # start(encoding = Psych :: Nodes :: Stream :: UTF8) -> Psych :: Stream (21326.0) -
Ruby オブジェクトを YAML document に変換するための準備をします。
...は Psych::Stream.new で指定した
出力先に出力されます。
finish を呼び出すことで出力が完了します(finish を呼び出さないと
最後まで出力されない場合があります)。
ブロック付きで start を呼び出すと、変換準備を終えた Stream... -
Psych
:: Stream # start(encoding = Psych :: Nodes :: Stream :: UTF8) {|em| . . . } -> Psych :: Stream (21326.0) -
Ruby オブジェクトを YAML document に変換するための準備をします。
...は Psych::Stream.new で指定した
出力先に出力されます。
finish を呼び出すことで出力が完了します(finish を呼び出さないと
最後まで出力されない場合があります)。
ブロック付きで start を呼び出すと、変換準備を終えた Stream... -
Psych
:: Visitors :: YAMLTree # start(encoding = Nodes :: Stream :: UTF8) -> Psych :: Nodes :: Stream (18305.0) -
Ruby オブジェクトから YAML AST への変換のための準備をします。
...す。
Psych::Visitors::YAMLTree#push が呼び出されたとき、
まだこのメソッドが呼び出されていなければ push メソッドがこの
メソッドを呼び出し、変換の準備をします。
encoding には以下のいずれかを指定できます。
* Psych::Nodes::......Node::UTF8
* Psych::Nodes::Node::UTF16BE
* Psych::Nodes::Node::UTF16LE
@param encoding YAML AST に設定するエンコーディング... -
Psych
:: Stream (18080.0) -
入力されたオブジェクトから変換された YAML document を指定した IO に出力する機能を持つクラスです。
...を持つクラスです。
start で変換を開始し、push で変換する Ruby オブジェクトを渡し、
最後に finish を呼ぶことで変換を完了します。
stream = Psych::Stream.new($stdout)
stream.start
stream.push({:foo => 'bar'})
stream.finish
YAML document は(......ish を確実に呼び出すためには Psych::Stream#start メソッドを
ブロック付きで呼び出すとよいでしょう。
stream = Psych::Stream.new($stdout)
stream.start do |em|
em.push(:foo => 'bar')
end
基本的な仕組みは Psych::Visitors::YAMLTree と似ています... -
Psych
:: Handler # start _ stream(encoding) -> () (12204.0) -
YAML ストリームの始まりで呼び出されます。
...されます。
encoding にはストリームのエンコーディング(以下のいずれか)が渡されます。
* Psych::Parser::UTF8
* Psych::Parser::UTF16BE
* Psych::Parser::UTF16LE
このメソッドは YAML のストリームごとに呼び出されます。一つのストリーム... -
Psych
:: Emitter (32.0) -
Psych::Parser でパースし、生じたイベントから YAML ドキュメントを再構築するようなハンドラです。
...Psych::Parser でパースし、生じたイベントから
YAML ドキュメントを再構築するようなハンドラです。
以下の例では STDIN から YAML ドキュメントを入力し、
再構築した YAML ドキュメントを STDERR に出力します。
parser = Psych::Pars......ては Psych::Handler を参照してください。
require 'psych'
require 'stringio'
output = StringIO.new
emitter = Psych::Emitter.new(output)
emitter.start_stream(Psych::Parser::UTF8)
emitter.start_document([1, 1], [], false)
emitter.start_mapping(nil, nil, false, Psych::Nod......scalar("a", nil, nil, true, false, Psych::Nodes::Scalar::PLAIN)
emitter.scalar("12", nil, nil, true, false, Psych::Nodes::Scalar::PLAIN)
emitter.scalar("xyz", nil, nil, true, false, Psych::Nodes::Scalar::PLAIN)
emitter.scalar("23", nil, nil, false, true, Psych::Nodes::Scalar::SINGLE_QUOTED)... -
Psych
:: Parser :: UTF16BE -> Integer (14.0) -
UTF-16BE エンコーディングを表します。
...UTF-16BE エンコーディングを表します。
@see Psych::Handler#start_stream... -
Psych
:: Parser :: UTF16LE -> Integer (14.0) -
UTF-16LE エンコーディングを表します。
...UTF-16LE エンコーディングを表します。
@see Psych::Handler#start_stream... -
Psych
:: Parser :: UTF8 -> Integer (14.0) -
UTF-8 エンコーディングを表します。
...UTF-8 エンコーディングを表します。
@see Psych::Handler#start_stream...