るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.032秒)
トップページ > クエリ:param[x] > 種類:インスタンスメソッド[x] > クエリ:file[x] > ライブラリ:rake[x] > クエリ:ruby[x] > クラス:Rake::FileList[x]

別のキーワード

  1. net/imap param
  2. win32ole win32ole_param
  3. bodytypetext param
  4. win32ole_param input?
  5. win32ole_param default

キーワード

検索結果

Rake::FileList#excluded_from_list?(file_name) -> bool (3147.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.exclu...
...de("test1.rb")
file
_list.excluded_from_list?("test1.rb") # => true
file
_list.excluded_from_list?("test2.rb") # => false
end
//}...

Rake::FileList#egrep(pattern) {|filename, count, line| ... } (3134.0)

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

...@param pattern 正規表現を指定します。

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

IO.write("sample1", "line1\nline2\nline3\n")
IO.write("sample2", "line1\nline2\nline3\nline4\n")

task default: :test_rake_app
task :test_rake_app do

file
_list = FileList.new('sample*')
file
...
...7

file
_list.egrep(/.*/) do |filename, count, line|
"filename = #{filename}, count = #{count}, line = #{line}"
end
end

# => "filename = sample1, count = 1, line = line1\n"
# => "filename = sample1, count = 2, line = line2\n"
# => "filename = sample1, count = 3, line = line3\n"
# => "filena...
...me = sample2, count = 1, line = line1\n"
# => "filename = sample2, count = 2, line = line2\n"
# => "filename = sample2, count = 3, line = line3\n"
# => "filename = sample2, count = 4, line = line4\n"
//}...

Rake::FileList#==(array) -> bool (3034.0)

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

...配列と比較します。

@param array 比較対象の配列を指定します。

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

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList.new('lib/**/*.rb', 'test/test*.rb')
file
_list == file_list.to_a # => true
end
//}...

Rake::FileList#import(array) -> self (3034.0)

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

...@param array ファイル名のリストを指定します。

//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", "test3.rb")
file
_...
...list.import(["test4.rb", "test5.rb"]) # => ["test4.rb", "test5.rb", "test1.rb", "test2.rb", "test3.rb"]
file
_list # => ["test4.rb", "test5.rb", "test1.rb", "test2.rb", "test3.rb"]
end
//}...