Ruby 1.9.2 リファレンスマニュアル > ライブラリ一覧 > rakeライブラリ > Rake::FileListクラス

class Rake::FileList

クラスの継承リスト: Rake::FileList < Rake::Cloneable < Object < Kernel < BasicObject

要約

このクラスは Array と基本的には同じです。

ファイルの操作をほんの少しだけ、簡単にするためのヘルパーメソッドがいくつか定義されています。

Rake::FileList は与えられた glob のパターンを使ってすぐにファイルを検索せずに、 後で評価するためにそれを保存しておきます。

このことは、多くのファイルにマッチする多くの Rake::FileList を使用できることを意味します。 実際に使用されると Rake::FileList が保持するパターンが評価されます。

特異メソッド

定義 説明
self[*args] -> Rake::FileList

与えられたパターンをもとにして自身を初期化します。

new(*patterns) {|self| ... }

与えられたパターンをもとにして自身を初期化します。

インスタンスメソッド

定義 説明
self * other -> Array | String

Array#* と動作を合わせるために再定義しています。

self == array -> bool

自身を配列に変換してから与えられた配列と比較します。

calculate_exclude_regexp

除外リストに含まれるパターンを適切に変換します。

clear_exclude -> self

登録されている除外リストをクリアします。

egrep(pattern) {|filename, count, line| ... }

与えられたパターンをファイルリストから grep のように検索します。

exclude(*patterns) {|entry| ... } -> self

自身から取り除くべきファイル名のパターンを自身の除外リストに登録します。

exclude?(file_name) -> bool

与えられたファイル名が除外される場合は、真を返します。 そうでない場合は偽を返します。

existing -> Rake::FileList

自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含む Rake::FileList を返します。

existing! -> self

自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含むように自身を変更して返します。

ext(newext = '') -> Rake::FileList

各要素に String#ext を適用した新しい Rake::FileList を返します。

gsub(pattern, replace) -> Rake::FileList

自身に含まれるファイルリストのそれぞれのエントリに対して String#gsub を実行し、 結果を新しい Rake::FileList として返します。

gsub!(pattern, replace) -> self

自身に含まれるファイルリストのそれぞれのエントリに対して String#gsub を実行します。 自身を破壊的に変更します。

import(array) -> self

与えられた配列を自身にインポートします。

include(*filenames) -> self

与えられたパターンを自身に追加します。

is_a?(klass) -> bool
kind_of?(klass) -> bool

自身に Array のフリをさせます。

pathmap(spec = nil) -> Rake::FileList

各要素に String#pathmap を適用した新しい Rake::FileList を返します。

resolve -> self

追加リストと除外リストを評価します。

sub(pattern, replace) -> Rake::FileList

自身に含まれるファイルリストのそれぞれのエントリに対して String#sub を実行し、 結果を新しい Rake::FileList として返します。

sub!(pattern, replace) -> self

自身に含まれるファイルリストのそれぞれのエントリに対して String#sub を実行します。 自身を破壊的に変更します。

to_a -> Array
to_ary -> Array

内部的な配列を返します。

to_s -> String

全ての要素をスペースで連結した文字列を返します。

定数

定義 説明
ARRAY_METHODS -> Array

Array に定義されているメソッドのリストです。

DEFAULT_IGNORE_PATTERNS -> Array

デフォルトで除外するパターンのリストです。

DEFAULT_IGNORE_PROCS

デフォルトで除外する手続きです。

DELEGATING_METHODS -> Array

委譲するメソッドのリストです。

MUST_DEFINE -> Array

必ず委譲しなければならない付加的なメソッドのリストです。

MUST_NOT_DEFINE -> Array

委譲してはいけないメソッドのリストです。

SPECIAL_RETURN -> Array

Array のインスタンスを返すので委譲した後にラップする必要があるメソッドのリストです。

継承したメソッド

! != === =~ __id__ __send__ _dump class dclone display enum_for eql? equal? extend freeze frozen? hash initialize initialize_copy inspect instance_eval instance_exec instance_of? instance_variable_defined? instance_variable_get instance_variable_set instance_variables marshal_dump marshal_load method method_missing methods must_be must_be_close_to must_be_empty must_be_instance_of must_be_kind_of must_be_nil must_be_same_as must_be_within_epsilon must_equal must_include must_match must_raise must_respond_to must_send must_throw nil? pretty_inspect pretty_print pretty_print_cycle pretty_print_inspect pretty_print_instance_variables private_methods protected_methods public_methods remove_instance_variable respond_to? respond_to_missing? singleton_class singleton_method_added singleton_method_removed singleton_method_undefined singleton_methods taint tainted? tap to_hash to_int to_io to_proc to_regexp to_str to_yaml to_yaml_properties to_yaml_style trust untaint untrust untrusted? wont_be wont_be_close_to wont_be_empty wont_be_instance_of wont_be_kind_of wont_be_nil wont_be_same_as wont_be_within_epsilon wont_equal wont_include wont_match wont_respond_to clone dup