るりまサーチ (Ruby 3.3)

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

別のキーワード

  1. yaml/dbm select
  2. psych to_yaml
  3. yaml/store new
  4. yaml yaml
  5. yaml/dbm dbm

ライブラリ

クラス

検索結果

Psych::Parser#parse(yaml) -> self (63658.0)

YAML ドキュメントをパースし、イベントハンドラに イベントを逐次通知します。

YAML ドキュメントをパースし、イベントハンドラに
イベントを逐次通知します。

@see Psych::Parser.new, Psych::Handler, Psych::Parser#handler

Psych::Nodes::Node#tag -> String | nil (40.0)

ノードに付加されたタグを返します。

ノードに付加されたタグを返します。

タグが付加されていない場合は nil を返します。

ast = Psych.parse(<<EOS)
---
- !!str a
- b
EOS

p ast.root.children[0].value # => "a"
p ast.root.children[0].tag # => "tag:yaml.org,2002:str"

p ast.root.children[1].value # => "b"
p ast.root.children[1].tag # => nil