9件ヒット
[1-9件を表示]
(0.032秒)
種類
- インスタンスメソッド (4)
- 定数 (3)
- クラス (2)
クラス
-
Psych
:: Handler (1) -
Psych
:: Parser (3) -
Psych
:: Stream (2) -
Psych
:: Visitors :: YAMLTree (1)
キーワード
- Emitter (1)
- UTF16BE (1)
- UTF16LE (1)
- UTF8 (1)
-
start
_ stream (1)
検索結果
先頭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 (97609.0) -
Ruby オブジェクトを YAML document に変換するための準備をします。
...Ruby オブジェクトを YAML document に変換するための準備をします。
変換された document は Psych::Stream.new で指定した
出力先に出力されます。
finish を呼び出すことで出力が完了します(finish を呼び出さないと
最後まで出力され... -
Psych
:: Stream # start(encoding = Psych :: Nodes :: Stream :: UTF8) {|em| . . . } -> Psych :: Stream (97609.0) -
Ruby オブジェクトを YAML document に変換するための準備をします。
...Ruby オブジェクトを YAML document に変換するための準備をします。
変換された document は Psych::Stream.new で指定した
出力先に出力されます。
finish を呼び出すことで出力が完了します(finish を呼び出さないと
最後まで出力され... -
Psych
:: Visitors :: YAMLTree # start(encoding = Nodes :: Stream :: UTF8) -> Psych :: Nodes :: Stream (88291.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 (87313.0) -
入力されたオブジェクトから変換された YAML document を指定した IO に出力する機能を持つクラスです。
...を完了します。
stream = Psych::Stream.new($stdout)
stream.start
stream.push({:foo => 'bar'})
stream.finish
YAML document は(バッファリングされずに)直接 $stdout に出力されます。
finish を確実に呼び出すためには 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) -> () (69667.0) -
YAML ストリームの始まりで呼び出されます。
...されます。
encoding にはストリームのエンコーディング(以下のいずれか)が渡されます。
* Psych::Parser::UTF8
* Psych::Parser::UTF16BE
* Psych::Parser::UTF16LE
このメソッドは YAML のストリームごとに呼び出されます。一つのストリーム... -
Psych
:: Emitter (33343.0) -
Psych::Parser でパースし、生じたイベントから YAML ドキュメントを再構築するようなハンドラです。
...Psych::Parser でパースし、生じたイベントから
YAML ドキュメントを再構築するようなハンドラです。
以下の例では STDIN から YAML ドキュメントを入力し、
再構築した YAML ドキュメントを STDERR に出力します。
parser = Psych::Pars......w(Psych::Emitter.new($stderr))
parser.parse($stdin)
また、以下のようにイベントを手動で発生させることで
YAML ドキュメントを構築させることもできます。
各メソッドの意味については Psych::Handler を参照してください。
require 'psych'......put = 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::Nodes::Mapping::BLOCK)
emitter.scalar("a", nil, nil, true, false, Psych::Nodes::Scalar::PLAIN)
emit... -
Psych
:: Parser :: UTF16BE -> Integer (33061.0) -
UTF-16BE エンコーディングを表します。
...UTF-16BE エンコーディングを表します。
@see Psych::Handler#start_stream... -
Psych
:: Parser :: UTF16LE -> Integer (33061.0) -
UTF-16LE エンコーディングを表します。
...UTF-16LE エンコーディングを表します。
@see Psych::Handler#start_stream... -
Psych
:: Parser :: UTF8 -> Integer (33061.0) -
UTF-8 エンコーディングを表します。
...UTF-8 エンコーディングを表します。
@see Psych::Handler#start_stream...