るりまサーチ

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

別のキーワード

  1. _builtin include?
  2. socket mcast_include
  3. ipaddr include?
  4. dbm include?
  5. sdbm include?

ライブラリ

クラス

モジュール

キーワード

検索結果

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

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

...t[例][ruby]{
require
"pathname"

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

Path
name("/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#entries -> [Pathname] (3119.0)

self に含まれるファイルエントリ名を元にした Pathname オブジェクトの配列を返します。

...にした Pathname オブジェクトの配列を返します。

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

//emlist[例][ruby]{
require
'pathname'
require
'pp'

pp Pathname('/usr/local').entries
# => [#<Pathname:.>,...
...# #<Pathname:..>,
# #<Pathname:bin>,
# #<Pathname:etc>,
# #<Pathname:include>,
# #<Pathname:lib>,
# #<Pathname:opt>,
# #<Pathname:sbin>,
# #<Pathname:share>,
# #<Pathname:var>]
//}

@see Dir.entries...

Pathname#each_entry {|pathname| ... } -> nil (3113.0)

Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。

...f.to_s) {|f| yield Pathname.new(f) } と同じです。


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

Path
name("/usr/local").each_entry {|f| p f }

# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}

@s...
...d Pathname.new(f) } と同じです。

ブロックを省略した場合は Enumerator を返します。

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

Path
name("/usr/local").each_entry {|f| p f }

# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>...
...# => #<Pathname:lib>
# => #<Pathname:opt>
//}

@see Dir.foreach...

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

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

...t[例][ruby]{
require
"pathname"

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

Path
name("/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_entry -> Enumerator (3013.0)

Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。

...d Pathname.new(f) } と同じです。

ブロックを省略した場合は Enumerator を返します。

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

Path
name("/usr/local").each_entry {|f| p f }

# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>...
...# => #<Pathname:lib>
# => #<Pathname:opt>
//}

@see Dir.foreach...

絞り込み条件を変える

Kernel#dir_config(target, idefault = nil, ldefault = nil) -> [String, String] (77.0)

configure オプション --with-TARGET-dir, --with-TARGET-include, --with-TARGET-lib をユーザが extconf.rb に指定できるようにします。

...configure オプション
--with-TARGET-dir,
--with-TARGET-include,
--with-TARGET-lib
をユーザが extconf.rb に指定できるようにします。

--with-TARGET-dir オプションは
システム標準ではない、
ヘッダファイルやライブラリがあるディレクトリをま...
...るために使います。
ユーザが extconf.rb に --with-TARGET-dir=PATH を指定したときは
$CFLAGS に "-IPATH/include" を、
$LDFLAGS に "-LPATH/lib" を、
それぞれ追加します。

--with-TARGET-include オプションは
システム標準ではないヘッダファイルの...
...--with-TARGET-include=PATH を指定したときは
$CFLAGS に PATH を追加します。

--with-TARGET-lib オプションは
システム標準ではないライブラリのディレクトリを指定するために使います。
ユーザが extconf.rb に --with-TARGET-lib=PATH を指定し...