るりまサーチ

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

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n
  3. rsa n=
  4. openssl n
  5. openssl n=

ライブラリ

キーワード

検索結果

<< 1 2 > >>

Rake::FileList#existing -> Rake::FileList (6102.0)

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

...含む Rake::FileList を返します。

//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.existing # => ["...
...test1.rb", "test2.rb"]
end
//}...

Rake::FileList#existing! -> self (6102.0)

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

...とする

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.existing! # => ["test1.rb", "test2.rb"]
file_list # => ["test1.rb", "test2.rb"]
end
//}...

Rake::FileList#include(*filenames) -> self (6102.0)

ファイル名のパターンを追加リストに登録します。 配列が与えられた場合、配列の各要素が追加されます。

...ターンを追加リストに登録します。
配列が与えられた場合、配列の各要素が追加されます。

@param filenames 追加するファイル名のパターンを指定します。

例:
file_list.include("*.java", "*.cfg")
file_list.include %w( math.c lib.h *.o )...

Rake::FileList#kind_of?(klass) -> bool (3102.0)

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

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

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

task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.is_a?(Array) # => true
file_list.is_a?(String) # => false
end
//}...

Rake::FileList#egrep(pattern) {|filename, count, line| ... } (156.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*')
fi...
.../line/) # => 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"...
...# => "filename = 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#pathmap(spec = nil) -> Rake::FileList (108.0)

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

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

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

task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.pathmap("%n") # => ["test1",...
..."test2", "test3"]
end
//}

@see String#pathmap...

Rake::FileList#*(other) -> Array | String (102.0)

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

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


@see Array#*

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

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

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

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

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

Rake::FileList#excluded_from_list?(file_name) -> bool (102.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_l...
...ist.exclude("test1.rb")
file_list.excluded_from_list?("test1.rb") # => true
file_list.excluded_from_list?("test2.rb") # => false
end
//}...

Rake::FileList#ext(newext = &#39;&#39;) -> Rake::FileList (102.0)

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

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

//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.ext(".erb") # => ["test1.erb", "test2.erb", "test3.erb"]
end
//}

@see String#ext...

絞り込み条件を変える

<< 1 2 > >>