3件ヒット
[1-3件を表示]
(0.141秒)
ライブラリ
- pathname (1)
-
rexml
/ document (2)
クラス
- Pathname (1)
-
REXML
:: Element (2)
検索結果
先頭3件
-
Pathname
# children(with _ directory = true) -> [Pathname] (72643.0) -
self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。
self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。
ただし、 ".", ".." は要素に含まれません。
@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。
@raise Errno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。
//emlist[例][ruby]{
require 'pathname'
Pathname.new("/tmp").children # => [#<Pathname:.X11-unix>, #<Pathname:.iroha_unix>... -
REXML
:: Element # root _ node -> REXML :: Document | REXML :: Node (9766.0) -
self が属する文書のルートノードを返します。
self が属する文書のルートノードを返します。
通常はその要素が属する文書(REXML::Document) オブジェクトが
返されます。
その要素が属する REXML::Document オブジェクトが存在しない
場合は木構造上のルートノードが返されます。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root>
<children>
<grandchildren />
</children>
</root>
EOS
children = doc.get_elements... -
REXML
:: Element # root -> REXML :: Element (9466.0) -
self が属する文書のルート要素を返します。
self が属する文書のルート要素を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root>
<children>
<grandchildren />
</children>
</root>
EOS
children = doc.get_elements("/root/children").first
children.name # => "children"
children.root.name # => "root"
grandchildren = doc.get...