るりまサーチ

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

別のキーワード

  1. rexml/document node_type
  2. node each
  3. tsort tsort_each_node
  4. node children

検索結果

<< < 1 2 >>

Psych::Nodes::Sequence#tag=(t) (9123.0)

sequence に付加する tag を設定します。

...sequence に付加する tag を設定します。

@param t 設定する tag
@see Psych::Nodes::Sequence#anchor=,
Psych::Nodes::Sequence.new...

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

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

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

これによって tag 付けされた YAML ドキュメントを Ruby のオブジェクトに
変換したりその逆をしたりすることができます。

@param tag 対象のクラスに関連付けるタグの文字列

=== Example
requir...
...# Registers tag with class Foo
Foo.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,...

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

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

...キュメントのバージョンを指定します。
[major, minor] という配列で指定します。

tag
_directives には tag directive の配列を指定します。
それぞれの tag は [prefix, suffix] という文字列の配列で
表現します。

implicit にはドキュメント...
...rsion YAML ドキュメントのバージョン
@param tag_directives tag directive の配列
@param implicit ドキュメントが implicit に始まっているかどうか

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

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

@see Psych::Handler#start_document...

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

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

...る anchor を文字列で指定します。
anchor を付けない場合には nil を指定します。

tag
には mapping に付加されている tag を文字列で指定します。
tag
を付けない場合には nil を指定します。

implicit には mapping が implicit に開始され...
...。以下のいずれ
かを指定できます。
* Psych::Nodes::Mapping::ANY
* Psych::Nodes::Mapping::BLOCK
* Psych::Nodes::Mapping::FLOW

@param anchor mapping に付加された anchor
@param tag mapping に付加された tag
@param implicit mapping が implicit に開始されたかど...

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

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

...します。

tag
には scalar に付加されている tag を文字列で指定します。
tag
を付けない場合には nil を指定します。

plain は plain style であるかどうか、quoted は quoted style であるかどうか
を指定します。style には node の style を...
...ych::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 スカラー値
@param anchor 関連付けられた anchor の名前
@param tag...

絞り込み条件を変える

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

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

...る anchor を文字列で指定します。
anchor を付けない場合には nil を指定します。

tag
には sequence に付加されている tag を文字列で指定します。
tag
を付けない場合には nil を指定します。

implicit には sequence が implicit に開始さ...
...以下のいずれ
かを指定できます。
* Psych::Nodes::Sequence::ANY
* Psych::Nodes::Sequence::BLOCK
* Psych::Nodes::Sequence::FLOW

@param anchor sequence に付加された anchor
@param tag sequence に付加された tag
@param implicit sequence が implicit に開始されたか...

Psych::Nodes::Sequence (3030.0)

YAML sequence http://yaml.org/spec/1.1/#sequence/syntax を表すクラスです。

...この例では Psych::Nodes::Sequence#anchor は "A" を返します。
%YAML 1.1
---
&A [
"This sequence",
"has an anchor"
]


tag
を付けることもできます。この例では
Psych::Nodes::Sequence#tag は "tag:yaml.org,2002:seq"
(!seq はこの tag の別名)を返しま...
...has a tag"
]

Psych::Nodes::Sequence は 0 個以上の子ノードを持つことができます。
子ノードは以下のいずれかクラスのインスタンスでなければなりません。
* Psych::Nodes::Sequence
* Psych::Nodes::Mapping
* Psych::Nodes::Scalar
* Psych::Nodes::A...

Psych::Handler#scalar(value, anchor, tag, plain, quoted, style) -> () (137.0)

スカラー値を見付けたときに呼び出されます。

...ます。

tag
にはスカラー値に関連付けられた tag の名前が文字列で渡されます。
tag
がない場合には nil が渡されます。

plain は plain style であるかどうか、quoted は quoted style であるかどうか
が渡されます。style には node の styl...
...渡されます。
style は次の値のいずれかです。
* Psych::Nodes::Scalar::PLAIN
* Psych::Nodes::Scalar::SINGLE_QUOTED
* Psych::Nodes::Scalar::DOUBLE_QUOTED
* Psych::Nodes::Scalar::LITERAL
* Psych::Nodes::Scalar::FOLDED

必要に応じてこのメソッドを override してく...
...ださい。

@param value スカラー値
@param anchor 関連付けられた anchor の名前
@param tag タグ名
@param plain plain style であるかどうか
@param quoted quoted style であるかどうか
@param style スカラーのスタイル

=== 例

以下の YAML ドキュメントに...
<< < 1 2 >>