種類
ライブラリ
- ビルトイン (533)
- find (44)
- matrix (66)
- mkmf (88)
-
net
/ http (33) - pathname (22)
- rake (11)
-
rdoc
/ context (55) -
rdoc
/ top _ level (33) -
rexml
/ document (22) -
rubygems
/ command _ manager (22) -
rubygems
/ commands / dependency _ command (22) -
rubygems
/ commands / which _ command (11) -
rubygems
/ dependency _ installer (22) -
rubygems
/ dependency _ list (11) -
rubygems
/ gem _ path _ searcher (22) -
rubygems
/ source _ index (11) -
rubygems
/ spec _ fetcher (11) - shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - socket (44)
- uri (11)
クラス
- Array (125)
- BasicObject (11)
- Dir (132)
- Encoding (22)
- Enumerator (5)
-
Enumerator
:: Lazy (28) -
Gem
:: CommandManager (22) -
Gem
:: Commands :: DependencyCommand (22) -
Gem
:: Commands :: WhichCommand (11) -
Gem
:: DependencyInstaller (22) -
Gem
:: DependencyList (11) -
Gem
:: GemPathSearcher (22) -
Gem
:: SourceIndex (11) -
Gem
:: SpecFetcher (11) - Matrix (66)
-
Net
:: HTTP (22) - Pathname (22)
-
RDoc
:: Context (55) -
RDoc
:: TopLevel (33) - Range (22)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) -
Socket
:: AncillaryData (33) -
Socket
:: Ifaddr (11) - String (11)
-
URI
:: Generic (11)
モジュール
- Enumerable (144)
- Find (33)
- Kernel (99)
-
Process
:: GID (11) -
Process
:: UID (11) -
REXML
:: Node (11)
キーワード
-
$ LDFLAGS (11) -
$ libs (11) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - ExternalEntity (11)
- Find (11)
- Lazy (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Propfind (11)
- bsearch (44)
-
bsearch
_ index (18) - detect (22)
- entries (22)
- filter (18)
-
find
_ all (44) -
find
_ bad _ fds (11) -
find
_ class _ named (11) -
find
_ class _ path (11) -
find
_ command (11) -
find
_ command _ possibilities (11) -
find
_ enclosing _ module _ named (11) -
find
_ executable (11) -
find
_ first _ recursive (11) -
find
_ gems (11) -
find
_ gems _ with _ sources (11) -
find
_ header (11) -
find
_ index (99) -
find
_ library (22) -
find
_ local _ symbol (22) -
find
_ matching (11) -
find
_ module _ named (22) -
find
_ name (22) -
find
_ paths (11) -
find
_ proxy (11) -
find
_ reverse _ dependencies (11) -
find
_ spec _ by _ name _ and _ version (11) -
find
_ symbol (11) -
find
_ system _ command (18) -
find
_ type (22) - foreach (44)
-
from
_ name (22) - ifindex (11)
- index (66)
-
ip
_ pktinfo (11) -
ipv6
_ pktinfo (11) -
ipv6
_ pktinfo _ ifindex (11) - lazy (11)
- list (11)
-
method
_ missing (11) - namespace (11)
- new (33)
- open (44)
- pack (19)
- pack テンプレート文字列 (11)
- produce (5)
- propfind (11)
- prune (11)
-
record
_ location (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) - select (33)
- unpack (11)
-
webrick
/ cgi (11)
検索結果
先頭5件
-
find (76108.0)
-
ディレクトリ配下のファイルを探索するためのモジュールです。
...リ配下のファイルを探索するためのモジュールです。
=== 使い方
require "find"
Find.find('/foo','/bar') {|f| ...}
または
require "find"
include Find
find('/foo','/bar') {|f| ...}
以下は、ruby のアーカイブに含まれるサンプルスクリプ......ュールで書き換えたものです。
#! /usr/bin/env ruby
require "find"
# 他人が書き込み可能な危険なコマンドを探す
for dir in ENV['PATH'].split(File::PATH_SEPARATOR)
Find.find(dir) do |fpath|
if File.file?(fpath) and (File.stat(fpath).mode & 022) != 0... -
Find
. # find(*dirs) -> Enumerator (70320.0) -
find(1) のように dir 配下のすべてのファイルや ディレクトリを一つずつ引数 file に渡してブロックを実行します。
...
find(1) のように dir 配下のすべてのファイルや
ディレクトリを一つずつ引数 file に渡してブロックを実行します。
ディレクトリのシンボリックリンクは辿りません。
また file に渡される順序は不定です。
ブロックを省略......クトリを一つ以上指定します。
例:
require 'find'
Find.find('/tmp') {|f|
Find.prune if f == "/tmp/bar"
...
}
あるディレクトリ配下の探索を省略したい場合は上記のように、
Find.#prune を使用します。この例では "/tmp/bar"
配下の......ファイルやディレクトリを探索しません。prune の代わりに
d:spec/control#next を使用した場合、"/tmp/bar" 自体をスキップする
だけで、その配下の探索は続行されます。
@see find(1), Find.#prune... -
Find
. # find(*dirs) {|file| . . . } -> nil (70320.0) -
find(1) のように dir 配下のすべてのファイルや ディレクトリを一つずつ引数 file に渡してブロックを実行します。
...
find(1) のように dir 配下のすべてのファイルや
ディレクトリを一つずつ引数 file に渡してブロックを実行します。
ディレクトリのシンボリックリンクは辿りません。
また file に渡される順序は不定です。
ブロックを省略......クトリを一つ以上指定します。
例:
require 'find'
Find.find('/tmp') {|f|
Find.prune if f == "/tmp/bar"
...
}
あるディレクトリ配下の探索を省略したい場合は上記のように、
Find.#prune を使用します。この例では "/tmp/bar"
配下の......ファイルやディレクトリを探索しません。prune の代わりに
d:spec/control#next を使用した場合、"/tmp/bar" 自体をスキップする
だけで、その配下の探索は続行されます。
@see find(1), Find.#prune... -
Find
. # find(*dirs , ignore _ error: true) -> Enumerator (70320.0) -
find(1) のように dir 配下のすべてのファイルや ディレクトリを一つずつ引数 file に渡してブロックを実行します。
...
find(1) のように dir 配下のすべてのファイルや
ディレクトリを一つずつ引数 file に渡してブロックを実行します。
ディレクトリのシンボリックリンクは辿りません。
また file に渡される順序は不定です。
ブロックを省略......無視するかどうかを指定します。
例:
require 'find'
Find.find('/tmp') {|f|
Find.prune if f == "/tmp/bar"
...
}
あるディレクトリ配下の探索を省略したい場合は上記のように、
Find.#prune を使用します。この例では "/tmp/bar"
配下......のファイルやディレクトリを探索しません。prune の代わりに
d:spec/control#next を使用した場合、"/tmp/bar" 自体をスキップする
だけで、その配下の探索は続行されます。
@see find(1), Find.#prune... -
Find
. # find(*dirs , ignore _ error: true) {|file| . . . } -> nil (70320.0) -
find(1) のように dir 配下のすべてのファイルや ディレクトリを一つずつ引数 file に渡してブロックを実行します。
...
find(1) のように dir 配下のすべてのファイルや
ディレクトリを一つずつ引数 file に渡してブロックを実行します。
ディレクトリのシンボリックリンクは辿りません。
また file に渡される順序は不定です。
ブロックを省略......無視するかどうかを指定します。
例:
require 'find'
Find.find('/tmp') {|f|
Find.prune if f == "/tmp/bar"
...
}
あるディレクトリ配下の探索を省略したい場合は上記のように、
Find.#prune を使用します。この例では "/tmp/bar"
配下......のファイルやディレクトリを探索しません。prune の代わりに
d:spec/control#next を使用した場合、"/tmp/bar" 自体をスキップする
だけで、その配下の探索は続行されます。
@see find(1), Find.#prune... -
Pathname
# find -> Enumerator (36264.0) -
self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。
...すべてのファイルやディレクトリを
一つずつ引数 pathname に渡してブロックを実行します。
require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}
と同じです。
ブロックを省略した場合は Enumerator を返します。
@see Find.#find... -
Pathname
# find {|pathname| . . . } -> nil (36264.0) -
self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。
...すべてのファイルやディレクトリを
一つずつ引数 pathname に渡してブロックを実行します。
require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}
と同じです。
ブロックを省略した場合は Enumerator を返します。
@see Find.#find... -
Pathname
# find(ignore _ error: true) -> Enumerator (36264.0) -
self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。
...クを実行します。
require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}
と同じです。
ブロックを省略した場合は Enumerator を返します。
@param ignore_error 探索中に発生した例外を無視するかどうかを指定します。
@see Find.#find... -
Pathname
# find(ignore _ error: true) {|pathname| . . . } -> nil (36264.0) -
self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。
...クを実行します。
require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}
と同じです。
ブロックを省略した場合は Enumerator を返します。
@param ignore_error 探索中に発生した例外を無視するかどうかを指定します。
@see Find.#find... -
Encoding
. find(name) -> Encoding (36214.0) -
指定された name という名前を持つ Encoding オブジェクトを返します。
...ロケールエンコーディングを表す locale、default_external を表す external、default_internal を表す internal、ファイルシステムエンコーディングを表す filesystem があります。
//emlist[例][ruby]{
p Encoding.find("utf-8") #=> #<Encoding:UTF-8>
//}... -
Gem
:: GemPathSearcher # find(path) -> Gem :: Specification | nil (36214.0) -
与えられたパスにマッチする Gem::Specification を一つだけ返します。
...与えられたパスにマッチする Gem::Specification を一つだけ返します。
@see Array#find... -
Find
. # prune -> () (34064.0) -
Find.#find メソッドのブロックにディレクトリが渡されたときにこ のメソッドを実行すると、そのディレクトリ配下の探索を無視します。
...
Find.#find メソッドのブロックにディレクトリが渡されたときにこ
のメソッドを実行すると、そのディレクトリ配下の探索を無視します。... -
Enumerable
# find(ifnone = nil) -> Enumerator (30240.0) -
要素に対してブロックを評価した値が真になった最初の要素を返します。
...ruby]{
# 最初の 3 の倍数を探す
p [1, 2, 3, 4, 5].find {|i| i % 3 == 0 } # => 3
p [2, 2, 2, 2, 2].find {|i| i % 3 == 0 } # => nil
# ifnone の使用例
ifnone = proc { raise ArgumentError, "item not found" }
p [1, 2, 3, 4, 5].find(ifnone) {|i| i % 7 == 0 }
# ArgumentError: item not... -
Enumerable
# find(ifnone = nil) {|item| . . . } -> object (30240.0) -
要素に対してブロックを評価した値が真になった最初の要素を返します。
...ruby]{
# 最初の 3 の倍数を探す
p [1, 2, 3, 4, 5].find {|i| i % 3 == 0 } # => 3
p [2, 2, 2, 2, 2].find {|i| i % 3 == 0 } # => nil
# ifnone の使用例
ifnone = proc { raise ArgumentError, "item not found" }
p [1, 2, 3, 4, 5].find(ifnone) {|i| i % 7 == 0 }
# ArgumentError: item not...