2件ヒット
[1-2件を表示]
(0.115秒)
クラス
- Dir (1)
-
Psych
:: Nodes :: Node (1)
検索結果
-
Dir
# children -> [String] (54646.0) -
ディレクトリのファイルエントリ名のうち、 "." と ".." をのぞいた配列を返します。
ディレクトリのファイルエントリ名のうち、
"." と ".." をのぞいた配列を返します。
@raise IOError 既に self が close している場合に発生します。
//emlist[例][ruby]{
Dir.open('.'){|d|
p d.children # => ["bar", "foo"]
}
//}
@see Dir.children -
Psych
:: Nodes :: Node # tag -> String | nil (379.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