るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. psych root
  2. document root
  3. pstore root?
  4. pathname root?
  5. rexml/document root

クラス

検索結果

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