るりまサーチ

最速Rubyリファレンスマニュアル検索!
214件ヒット [1-100件を表示] (0.033秒)
トップページ > クエリ:etc[x] > クエリ:each[x]

別のキーワード

  1. etc passwd
  2. etc group
  3. etc name
  4. etc uname

検索結果

<< 1 2 3 > >>

Etc::Group.each {|entry| ... } -> Etc::Group (29225.0)

/etc/group に含まれるエントリを一つずつブロックに渡して評価します。 ブロックを省略した場合は Enumerator を返します。

.../etc/group に含まれるエントリを一つずつブロックに渡して評価します。
ブロックを省略した場合は Enumerator を返します。

@see Etc.#getpwent...

Etc::Passwd.each {|entry| ... } -> Etc::Passwd (29225.0)

/etc/passwd に含まれるエントリを一つずつブロックに渡して評価します。 ブロックを省略した場合は Enumerator を返します。

.../etc/passwd に含まれるエントリを一つずつブロックに渡して評価します。
ブロックを省略した場合は Enumerator を返します。

@see Etc.#getpwent...

Etc::Group.each -> Enumerator (29125.0)

/etc/group に含まれるエントリを一つずつブロックに渡して評価します。 ブロックを省略した場合は Enumerator を返します。

.../etc/group に含まれるエントリを一つずつブロックに渡して評価します。
ブロックを省略した場合は Enumerator を返します。

@see Etc.#getpwent...

Etc::Passwd.each -> Enumerator (29125.0)

/etc/passwd に含まれるエントリを一つずつブロックに渡して評価します。 ブロックを省略した場合は Enumerator を返します。

.../etc/passwd に含まれるエントリを一つずつブロックに渡して評価します。
ブロックを省略した場合は Enumerator を返します。

@see Etc.#getpwent...

Shell::Filter#each(rs = nil) -> () (18113.0)

フィルタの一行ずつをblockに渡します。

...行ずつをblockに渡します。

@param rs レコードセパレーターを表す文字列を指定します。
nil ならば、Shell.record_separatorの値が使用されます。

使用例
require 'shell'
sh = Shell.new
sh.cat("/etc/passwd").each { |line|
puts line
}...

絞り込み条件を変える

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

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

...ectory).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/sbin>
# => #<Pathname:/usr/local/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#each_child(with_directory = true) {|pathname| ...} -> [Pathname] (6142.0)

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

...ectory).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/sbin>
# => #<Pathname:/usr/local/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#each_entry -> Enumerator (6114.0)

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

...reach(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:lib>
# => #<Pathname:opt>
//}

@see Dir.foreach...

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

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

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


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

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

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

@see Dir.foreach...
...reach(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:lib>
# => #<Pathname:opt>
//}

@see Dir.foreach...

Resolv.each_address(name) {|address| ...} -> () (6107.0)

ホスト名 name の IP アドレスをルックアップし、 各ルックアップ結果のアドレスに対してブロックを評価します。

...ホスト名 name の IP アドレスをルックアップし、
各ルックアップ結果のアドレスに対してブロックを評価します。

ルックアップは /etc/hosts, DNS の順で行います。

@param name ホスト名を文字列で与えます。...

絞り込み条件を変える

<< 1 2 3 > >>