るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.021秒)
トップページ > クエリ:psych[x] > ライブラリ:psych[x] > バージョン:2.7.0[x] > クエリ:root[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. psych new
  2. psych any
  3. psych dump
  4. psych tag
  5. psych anchor

検索結果

Psych::TreeBuilder#root -> Psych::Nodes::Stream (87682.0)

AST の root を返します。

...AST の root を返します。

@see Psych::Nodes::Stream...

Psych::Nodes::Document#root -> Psych::Nodes::Node (87616.0)

ルートノードを返します。

ルートノードを返します。

Psych::Nodes::Node#tag -> String | nil (33100.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.ch...