4件ヒット
[1-4件を表示]
(0.033秒)
ライブラリ
- pathname (1)
- shell (1)
-
shell
/ command-processor (1) -
shell
/ filter (1)
クラス
- Pathname (1)
- Shell (1)
-
Shell
:: CommandProcessor (1) -
Shell
:: Filter (1)
キーワード
-
each
_ entry (1) - foreach (3)
検索結果
先頭4件
-
Shell
# foreach(path = nil , &block) -> () (54469.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
pathがファイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
puts f
} -
Shell
:: CommandProcessor # foreach(path = nil , &block) -> () (54469.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
pathがファイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
puts f
} -
Shell
:: Filter # foreach(path = nil , &block) -> () (54469.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
pathがファイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
puts f
} -
Pathname
# each _ entry {|pathname| . . . } -> nil (202.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>
# => #<Pathname:opt>
//}
@...