るりまサーチ

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

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub!

ライブラリ

クラス

検索結果

Dir#children -> [String] (18215.0)

ディレクトリのファイルエントリ名のうち、 "." と ".." をのぞいた配列を返します。

...ディレクトリのファイルエントリ名のうち、
"." と ".." をのぞいた配列を返します。

@raise IOError 既に self が close している場合に発生します。

//emlist[例][ruby]{
Dir.open('.'){|d|
p d.children # => ["bar", "foo"]
}
//}

@see Dir.children...

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