るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
15件ヒット [1-15件を表示] (0.038秒)

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

検索結果

Psych::Visitors::YAMLTree.new(options = {}, emitter = Psych::TreeBuilder.new, ss = Psych::ScalarScanner.new) -> Psych::Visitors::YAMLTree (54919.0)

YAMLTree オブジェクトを生成します。

...定します。
Psych
.dump と同じオプションが指定できます。

emitter には AST の構築に使われる Psych::TreeBuilder オブジェクト
を渡します。

ss は Ruby の String が YAML document 上で quote が必要かどうか
を判定するための Psych::ScalarScanner...
...常デフォルトのものから変える必要はないでしょう。

@param options オプション
@param emitter AST の構築に使う Psych::TreeBuilder オブジェクト
@param ss 文字列に quite が必要かどうかを判定するための Psych::ScalarScanner オブジェクト...

Psych::Parser.new(handler = Handler.new) -> Psych::Parser (54616.0)

新たなパーサオブジェクトを生成して返します。

...新たなパーサオブジェクトを生成して返します。

handler で YAML のイベントを処理するハンドラを指定します。
詳しくは Psych::Parser を参照してください。

@param handler YAML のイベントを処理するハンドラ...

Psych::Nodes::Document.new(version=[], tag_directives=[], implicit=false) -> Psych::Nodes::Document (54331.0)

Document オブジェクトを生成します。

...YAML 1.1 のドキュメントで、
tag directive を1つ持ち、 implicit にドキュメントが開始
している Document オブジェクトを生成しています。

Psych
::Nodes::Document.new(
[1,1],
tenderlovemaking.com,2009:",
true)

@see Psych::Handler#start_document...

Psych::Emitter.new(io) -> Psych::Emitter (54313.0)

Emitter オブジェクトを生成して返します。

Emitter オブジェクトを生成して返します。

@param io 出力先の IO オブジェクト

Psych::Nodes::Alias.new(anchor) -> Psych::Nodes::Alias (54313.0)

新たな Alias オブジェクトを生成します。

新たな Alias オブジェクトを生成します。

anchor で指す先の anchor を指定します。

@param anchor 指す先の anchor

絞り込み条件を変える

Psych::Nodes::Mapping.new(anchor=nil, tag=nil, implicit=true, style=BLOCK) -> Psych::Nodes::Mapping (54313.0)

新たな mapping オブジェクトを生成します。

...AML ドキュメント上の style を整数で指定します。以下のいずれ
かを指定できます。
* Psych::Nodes::Mapping::ANY
* Psych::Nodes::Mapping::BLOCK
* Psych::Nodes::Mapping::FLOW

@param anchor mapping に付加された anchor
@param tag mapping に付加された tag
@...

Psych::Nodes::Scalar.new(value, anchor=nil, tag=nil, plain=true, quoted=false, style=ANY) -> Psych::Nodes:Scalar (54313.0)

Scalar オブジェクトを生成します。

...します。
style は次の値のいずれかです。
* Psych::Nodes::Scalar::ANY
* Psych::Nodes::Scalar::PLAIN
* Psych::Nodes::Scalar::SINGLE_QUOTED
* Psych::Nodes::Scalar::DOUBLE_QUOTED
* Psych::Nodes::Scalar::LITERAL
* Psych::Nodes::Scalar::FOLDED

@param value スカラー値
@para...

Psych::Nodes::Sequence.new(anchor=nil, tag=nil, implicit=true, style=BLOCK) -> Psych::Nodes::Sequence (54313.0)

新たな sequence オブジェクトを生成します。

...ML ドキュメント上の style を整数で指定します。以下のいずれ
かを指定できます。
* Psych::Nodes::Sequence::ANY
* Psych::Nodes::Sequence::BLOCK
* Psych::Nodes::Sequence::FLOW

@param anchor sequence に付加された anchor
@param tag sequence に付加された t...

Psych::Nodes::Stream.new(encoding = Psych::Nodes::Stream::UTF8) -> Psych::Nodes::Stream (54313.0)

Psych::Nodes::Stream オブジェクトを生成して返します。

...
Psych
::Nodes::Stream オブジェクトを生成して返します。

encoding には stream に使われるエンコーディングを指定します。
以下のいずれかを指定します。
* Psych::Nodes::Node::UTF8
* Psych::Nodes::Node::UTF16BE
* Psych::Nodes::Node::UTF16LE

@param...

Psych::ScalarScanner.new (54313.0)

新たな ScalarScanner オブジェクトを生成します。

新たな ScalarScanner オブジェクトを生成します。

絞り込み条件を変える

Psych::Stream.new(io) -> Psych::Stream (54313.0)

新たな Stream オブジェクトを生成します。

新たな Stream オブジェクトを生成します。

io で YAML document の出力先を指定します。

@param io 出力先の IO オブジェクト

Psych::TreeBuilder.new -> Psych::TreeBuilder (54313.0)

TreeBuilder オブジェクトを生成します。

TreeBuilder オブジェクトを生成します。

Object.yaml_tag(tag) -> () (46.0)

クラスと tag の間を関連付けます。

...g 対象のクラスに関連付けるタグの文字列

=== Example
require 'psych'

class Foo
def initialize(x)
@x = x
end

attr_reader :x
end

# Dumps Ruby object normally
p Psych.dump(Foo.new(3))
# =>
# --- !ruby/object:Foo
# x: 3

# Registers tag...
...yaml_as("tag:example.com,2013:foo")
# ... and dumps the object of Foo class
Psych
.dump(Foo.new(3), STDOUT)
# =>
# --- !<tag:example.com,2013:foo>
# x: 3

# Loads the object from the tagged YAML node
p Psych.load(<<EOS)
--- !<tag:example.com,2012:foo>
x: 8
EOS
# => #<Foo:0x00...

Psych.dump(o, io, options = {}) -> () (46.0)

Ruby のオブジェクト o を YAML ドキュメントに変換します。

...[例][ruby]{
# Dump an array, get back a YAML string
Psych
.dump(['a', 'b']) # => "---\n- a\n- b\n"

# Dump an array to an IO object
Psych
.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>

# Dump an array with indentation set
Psych
.dump(['a', ['b']], :indentation => 3) # => "---\n-...
...a\n- - b\n"

# Dump an array to an IO with indentation set
Psych
.dump(['a', ['b']], StringIO.new, :indentation => 3)
//}...

Psych.dump(o, options = {}) -> String (46.0)

Ruby のオブジェクト o を YAML ドキュメントに変換します。

...[例][ruby]{
# Dump an array, get back a YAML string
Psych
.dump(['a', 'b']) # => "---\n- a\n- b\n"

# Dump an array to an IO object
Psych
.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>

# Dump an array with indentation set
Psych
.dump(['a', ['b']], :indentation => 3) # => "---\n-...
...a\n- - b\n"

# Dump an array to an IO with indentation set
Psych
.dump(['a', ['b']], StringIO.new, :indentation => 3)
//}...

絞り込み条件を変える