240件ヒット
[1-100件を表示]
(0.077秒)
別のキーワード
クラス
-
Rake
:: Application (108) -
Rake
:: FileList (48) -
Rake
:: FileTask (12) -
Rake
:: InvocationChain (36) -
Rake
:: PackageTask (12)
モジュール
- FileUtils (12)
-
Rake
:: TaskManager (12)
キーワード
-
add
_ loader (12) - append (12)
-
create
_ rule (12) - egrep (12)
- gsub! (12)
- init (12)
- member? (12)
- name (12)
-
original
_ dir (12) -
package
_ dir _ path (12) - pathmap (12)
- rakefile (12)
- sub! (12)
-
to
_ s (12) -
top
_ level (12) -
top
_ level _ tasks (12) -
tty
_ output= (12)
検索結果
先頭5件
-
FileUtils
# ruby(*args) {|result , status| . . . } (30461.0) -
与えられた引数で Ruby インタプリタを実行します。
...与えられた引数で Ruby インタプリタを実行します。
@param args Ruby インタプリタに与える引数を指定します。
例:
ruby %{-pe '$_.upcase!' <README}
@see Kernel.#sh... -
Rake
:: TaskManager # create _ rule(*args) { . . . } (12215.0) -
与えられたパラメータに従ってルールを作成します。
...aram args ルールに与えるパラメータを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
rule = Rake.application.create_rule '.txt' => '.md' do |t|
"#{t}"
end
p rule # => 0x0000558dd2e32d20 /path/to/Rake... -
Rake
:: PackageTask # package _ dir _ path -> String (12214.0) -
パッケージに含むファイルを配置するディレクトリを返します。
...パッケージに含むファイルを配置するディレクトリを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_dir_path # => "pkg/sample-1.0.0"
end
//}... -
Rake
:: Application # rakefile -> String (12115.0) -
実際に使用されている Rakefile の名前を返します。
...実際に使用されている Rakefile の名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.rakefile # => "Rakefile"
end
//}... -
Rake
:: Application # original _ dir -> String (9215.0) -
rake コマンドを実行したディレクトリを返します。
...
rake コマンドを実行したディレクトリを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.original_dir # => "/path/to/dir"
end
//}... -
Rake
:: FileList # pathmap(spec = nil) -> Rake :: FileList (9215.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
:: Application # add _ loader(ext , loader) (9115.0) -
与えられた拡張子で終わるファイル名のファイルをロードするためのローダーを 自身に追加します。
...。
@param ext 拡張子を指定します。
@param loader ローダーを指定します。
//emlist[例][ruby]{
require "rake/loaders/makefile"
# Rakefile での記載例とする
task default: :test
task :test
makefile =<<-EOS
<< <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
EOS
IO.write("sampl......e.mf", makefile)
Rake.application.add_loader("mf", Rake::MakefileLoader.new)
Rake.application.add_import("sample.mf")
Rake::Task.task_defined?("a") # => false
Rake.application.load_imports
Rake::Task.task_defined?("a") # => true
//}... -
Rake
:: InvocationChain # member?(task _ name) -> bool (9115.0) -
与えられたタスク名が自身に含まれる場合は真を返します。 そうでない場合は偽を返します。
...aram task_name タスク名を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
invocation_chain = Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
invocation_chain.member?("task_a") # => true
invocat......ion_chain.member?("task_b") # => false
end
//}... -
Rake
:: FileList # egrep(pattern) {|filename , count , line| . . . } (6215.0) -
与えられたパターンをファイルリストから grep のように検索します。
...与えられたパターンをファイルリストから 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 = FileLis......t.new('sample*')
file_list.egrep(/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 = s...