るりまサーチ

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

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

検索結果

RubyVM::AbstractSyntaxTree::Node#children -> Array (44232.0)

self の子ノードを配列で返します。

...type によって異なります。

戻り値は、ほかの RubyVM::AbstractSyntaxTree::Node のインスタンスや nil を含みます。

//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.children
# => [[], nil, #<RubyVM::AbstractSyntaxTree::Node:OPCALL@1:0-1:5>]
//}...

Dir#children -> [String] (18238.0)

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

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

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

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

@
see Dir.children...

Pathname#children(with_directory = true) -> [Pathname] (18238.0)

self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。

...含まれません。

@
param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

@
raise Errno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。

//emlist[例][ruby]{
require 'pathname'
P...
...athname.new("/tmp").children # => [#<Pathname:.X11-unix>, #<Pathname:.iroha_unix>, ... ]
//}...

Pathname#each_child(with_directory = true) -> Enumerator (147.0)

self.children(with_directory).each と同じです。

...self.children(with_directory).each と同じです。

@
param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

//emlist[例][ruby]{
require "pathname"

Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname...
...al/share>
# => #<Pathname:/usr/local/var>

Pathname("/usr/local").each_child(false) {|f| p f }
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
# => #<Pathname:sbin>
# => #<Pathname:share>
# => #<Pathname:var>
//}

@
see Pathname#children...

Pathname#each_child(with_directory = true) {|pathname| ...} -> [Pathname] (147.0)

self.children(with_directory).each と同じです。

...self.children(with_directory).each と同じです。

@
param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

//emlist[例][ruby]{
require "pathname"

Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname...
...al/share>
# => #<Pathname:/usr/local/var>

Pathname("/usr/local").each_child(false) {|f| p f }
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
# => #<Pathname:sbin>
# => #<Pathname:share>
# => #<Pathname:var>
//}

@
see Pathname#children...

絞り込み条件を変える