るりまサーチ

最速Rubyリファレンスマニュアル検索!
66件ヒット [1-66件を表示] (0.117秒)

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file ctime
  4. file mtime
  5. file size

ライブラリ

クラス

モジュール

キーワード

検索結果

Rake::FileList#exclude(*patterns) {|entry| ... } -> self (21138.0)

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

...ません。

例:
File
List['a.c', 'b.c'].exclude("a.c") # => ['b.c']
File
List['a.c', 'b.c'].exclude(/^a/) # => ['b.c']

# If "a.c" is a file, then ...
File
List['a.c', 'b.c'].exclude("a.*") # => ['b.c']

# If "a.c" is not a file, then ...
File
List['a.c', 'b.c'].exclude("a.*") # => ['a.c...

Rake::FileList#excluded_from_list?(file_name) -> bool (9238.0)

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

...@param file_name ファイル名を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

IO.write("test1.rb", "test")
IO.write("test2.rb", "test")

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList.new("test1.rb", "test2.rb")
file
_list.exclude("test1...
....rb")
file_list.excluded_from_list?("test1.rb") # => true
file
_list.excluded_from_list?("test2.rb") # => false
end
//}...

Rake::FileList#clear_exclude -> self (9138.0)

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

...by]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList.new("test.rb", "test.bak")
file
_list.exclude("test.rb")
# DEFAULT_IGNORE_PATTERNS と "test.rb" の双方の除外がクリアされる
file
_list.clear_exclude
file
_list # =>...

Rake::FileList#resolve -> self (3031.0)

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

...][ruby]{
# Rakefile での記載例とする

IO.write("test.rb", "test")
IO.write("test.java", "test")
IO.write("test.js", "test")

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList.new("*.rb")
file
_list.include("*.java")
file
_list.exclude("*.js")
file
_list.resolve #...

Rake::Cloneable#dup -> object (37.0)

自身と同じクラスのオブジェクトを作成後、自身のインスタンス変数を 全て新たに作成したオブジェクトにコピーします。

...y]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList['a.c', 'b.c']
file
_list.freeze
dup = file_list.dup
clone = file_list.clone
dup.exclude("a.c") # => ["b.c"]
clone.exclude("a.c") # => can't modify frozen Rake::FileList
end...

絞り込み条件を変える

Rake::Cloneable#clone -> object (25.0)

自身を複製します。

...ています。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList['a.c', 'b.c']
clone = file_list.clone
clone # => ["a.c", "b.c"]
clone.exclude("a.c")
clone == file_list # => false
end
//}...