ライブラリ
- rake (18)
クラス
-
Rake
:: Application (11) -
Rake
:: FileList (4) -
Rake
:: FileTask (1) -
Rake
:: InvocationChain (1)
モジュール
キーワード
-
add
_ loader (1) -
create
_ rule (1) - egrep (1)
- gsub! (1)
- init (1)
-
load
_ rakefile (1) - member? (1)
- name (1)
-
original
_ dir (1) - pathmap (1)
- run (1)
- sub! (1)
-
top
_ level (1) -
top
_ level _ tasks (1) -
tty
_ output= (1)
検索結果
先頭5件
-
Rake
:: Application # rakefile -> String (81709.0) -
実際に使用されている Rakefile の名前を返します。
実際に使用されている Rakefile の名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.rakefile # => "Rakefile"
end
//} -
Rake
:: Application # load _ rakefile (45655.0) -
Rakefile を探してロードします。
Rakefile を探してロードします。 -
Rake
:: TaskManager # create _ rule(*args) { . . . } (36640.0) -
与えられたパラメータに従ってルールを作成します。
与えられたパラメータに従ってルールを作成します。
@param 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/Rakefile:5>
end
//} -
Rake
:: Application # add _ loader(ext , loader) (27622.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("sample.mf", makefile)... -
Rake
:: FileList # pathmap(spec = nil) -> Rake :: FileList (27622.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 # original _ dir -> String (27322.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
:: Application # top _ level (27322.0) -
Rake アプリケーションに与えられたトップレベルのタスク (コマンドラインで指定されたタスク) を実行します。
Rake アプリケーションに与えられたトップレベルのタスク
(コマンドラインで指定されたタスク) を実行します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test1
task :test1
task :test2 do
puts "test2"
end
# rake test2 で実行
Rake.application.top_level
# => "test2"
//} -
Rake
:: Application # top _ level _ tasks -> Array (27322.0) -
コマンドラインで指定されたタスクのリストを返します。
コマンドラインで指定されたタスクのリストを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.top_level_tasks # => ["default"]
end
//} -
Rake
:: Application # tty _ output=(tty _ output _ state) (18322.0) -
TTY に対する出力状態を上書きします。
TTY に対する出力状態を上書きします。
大抵の場合、テストのために使用します。
@param tty_output_state 変更後の状態を指定します
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.tty_output? # => false
Rake.application.tty_output = "debug output" # => "debug output"
... -
Rake
:: Application # init(app _ name = & # 39;rake& # 39;) (18022.0) -
コマンドラインオプションとアプリケーション名を初期化します。
コマンドラインオプションとアプリケーション名を初期化します。
//emlist[例][ruby]{
# Rakefile での記載例とする
task default: :test
task :test
Rake.application.name # => "rake"
Rake.application.init("MyApp") # => ["default"]
Rake.application.name # => "MyApp"
//} -
Rake
:: Application # name -> String (18022.0) -
アプリケーションの名前を返します。通常は 'rake' という名前を返します。
アプリケーションの名前を返します。通常は 'rake' という名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.name # => "rake"
end
//} -
Rake
:: Application # options -> OpenStruct (18022.0) -
コマンドラインで与えられたアプリケーションのオプションを返します。
コマンドラインで与えられたアプリケーションのオプションを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.options # => #<OpenStruct always_multitask=false, backtrace=false, build_all=false, dryrun=false, ignore_deprecate=false, ignore_system=false, job_stats=... -
Rake
:: Application # run (18022.0) -
Rake アプリケーションを実行します。
Rake アプリケーションを実行します。
このメソッドは以下の 3 ステップを実行します。
* コマンドラインオプションを初期化します。Rake::Application#init
* タスクを定義します。Rake::Application#load_rakefile
* コマンドラインで指定されたタスクを実行します。Rake::Application#top_level -
Rake
:: FileList # egrep(pattern) {|filename , count , line| . . . } (9622.0) -
与えられたパターンをファイルリストから grep のように検索します。
与えられたパターンをファイルリストから grep のように検索します。
ブロックが与えられた場合は、マッチした行の情報 (ファイル名、行番号、マッチした行) が
ブロックに渡されてブロックが評価されます。ブロックが与えられなかった場合は、
標準出力に、ファイル名:行番号:マッチした行を出力します。
@param pattern 正規表現を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
IO.write("sample1", "line1\nline2\nline3\n")
IO.write("sample2", "line1\nline2\n... -
Rake
:: FileList # gsub!(pattern , replace) -> self (9622.0) -
自身に含まれるファイルリストのそれぞれのエントリに対して String#gsub を実行します。 自身を破壊的に変更します。
自身に含まれるファイルリストのそれぞれのエントリに対して String#gsub を実行します。
自身を破壊的に変更します。
//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.gsub!(/\.r... -
Rake
:: FileList # sub!(pattern , replace) -> self (9622.0) -
自身に含まれるファイルリストのそれぞれのエントリに対して String#sub を実行します。 自身を破壊的に変更します。
自身に含まれるファイルリストのそれぞれのエントリに対して String#sub を実行します。
自身を破壊的に変更します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.sub!(/\.c$/, '.o') # => ['a.o', 'b.o']
file_list # => ['a.o', 'b.o']
end
//... -
Rake
:: FileTask # timestamp -> Time | Rake :: LateTime (9622.0) -
ファイルタスクのタイムスタンプを返します。
ファイルタスクのタイムスタンプを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: "test.txt"
file "test.txt" do |task|
Rake.application.options.build_all = false
task.timestamp # => #<Rake::LateTime:0x2ba58f0>
end
//} -
Rake
:: InvocationChain # member?(task _ name) -> bool (9322.0) -
与えられたタスク名が自身に含まれる場合は真を返します。 そうでない場合は偽を返します。
与えられたタスク名が自身に含まれる場合は真を返します。
そうでない場合は偽を返します。
@param 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...