5件ヒット
[1-5件を表示]
(0.072秒)
別のキーワード
クラス
- Pathname (4)
-
Resolv
:: Hosts (1)
キーワード
-
each
_ child (2) -
each
_ entry (2) -
each
_ name (1)
検索結果
先頭5件
-
Pathname
# each _ child(with _ directory = true) -> Enumerator (18430.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:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/us... -
Pathname
# each _ child(with _ directory = true) {|pathname| . . . } -> [Pathname] (18430.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:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/us... -
Pathname
# each _ entry -> Enumerator (18346.0) -
Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
require "pathname"
Pathname("/usr/local").each_entry {|f| p f }
# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:l... -
Pathname
# each _ entry {|pathname| . . . } -> nil (18346.0) -
Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
require "pathname"
Pathname("/usr/local").each_entry {|f| p f }
# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:l... -
Resolv
:: Hosts # each _ name(address) {|name| . . . } -> () (18325.0) -
IP アドレス address のホスト名をルックアップし、 各ルックアップ結果のホスト名に対してブロックを評価します。
IP アドレス address のホスト名をルックアップし、
各ルックアップ結果のホスト名に対してブロックを評価します。
ルックアップは /etc/hosts, DNS の順で行います。
@param address IPアドレスを文字列で与えます。