別のキーワード
種類
- インスタンスメソッド (11)
- 特異メソッド (5)
クラス
モジュール
- Rake (2)
-
Rake
:: TaskManager (1)
キーワード
- append (3)
- application (1)
- application= (1)
- egrep (1)
-
excluded
_ from _ list? (1) - init (2)
- load (1)
- member? (2)
- new (2)
-
synthesize
_ file _ task (1)
検索結果
先頭5件
-
Rake
:: Application # name -> String (63328.0) -
アプリケーションの名前を返します。通常は 'rake' という名前を返します。
...アプリケーションの名前を返します。通常は 'rake' という名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.name # => "rake"
end
//}... -
Rake
. application -> Rake :: Application (18643.0) -
現在の Rake アプリケーションを返します。
...現在の Rake アプリケーションを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'pp'
task default: :test_rake_app
task :test_rake_app do
pp Rake.application
end
# => #<Rake::Application:0x31b0f18
# @default_loader=#<Rake::DefaultLoader:0x31b0c78>,
#......st_description=nil,
# @loaders=
# {".rb"=>#<Rake::DefaultLoader:0x31b0c18>,
# ".rf"=>#<Rake::DefaultLoader:0x31b0b88>,
# ".rake"=>#<Rake::DefaultLoader:0x31b0b10>},
# @name="rake",
# @options=#<OpenStruct rakelib=["rakelib"], trace_output=#<IO:<STDERR>>>,
# @original......nding_imports=[],
# @rakefile="rakefile",
# @rakefiles=["rakefile", "Rakefile", "rakefile.rb", "Rakefile.rb"],
# @rules=[],
# @scope=LL(),
# @tasks=
# {"default"=><Rake::Task default => [test_rake_app]>,
# "test_rake_app"=><Rake::Task test_rake_app => []>},
# @term... -
Rake
:: InvocationChain :: EmptyInvocationChain # append(task _ name) -> Rake :: InvocationChain (18628.0) -
与えられた値を追加した Rake::InvocationChain を返します。
...与えられた値を追加した Rake::InvocationChain を返します。
@param task_name 追加する値を指定します。... -
Rake
. application=(app) (18343.0) -
現在の Rake アプリケーションをセットします。
...現在の Rake アプリケーションをセットします。
@param app Rake::Application のインスタンスを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'pp'
task default: :test_rake_app
task :test_rake_app do
app = Rake::Application.new
app.tty_......output = true
Rake.application = app
pp Rake.application
end
# => #<Rake::Application:0x00005624e6c30eb8
# @default_loader=#<Rake::DefaultLoader:0x00005624e6c30cd8>,
# @imported=[],
# @last_description=nil,
# @loaders=
# {".rb"=>#<Rake::DefaultLoader:0x00005624e6c30bc0>,
#......".rf"=>#<Rake::DefaultLoader:0x00005624e6c30b48>,
# ".rake"=>#<Rake::DefaultLoader:0x00005624e6c30a80>},
# @name="rake",
# @options=
# #<OpenStruct always_multitask=false, backtrace=false, build_all=false, dryrun=false, ignore_deprecate=false, ignore_system=false, job_stats=... -
Rake
:: InvocationChain :: EmptyInvocationChain # member?(task _ name) -> bool (18310.0) -
偽を返します。
偽を返します。 -
Rake
:: InvocationChain # append(task _ name) -> Rake :: InvocationChain (9628.0) -
与えられたタスク名を追加して新しい Rake::InvocationChain を返します。
...しい Rake::InvocationChain を返します。
@param task_name 追加するタスク名を指定します。
@raise RuntimeError 循環したタスクの呼び出しを検出した場合に発生します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
tas......k :test_rake_app do
invocation_chain= Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
invocation_chain.append("task_b") # => LL("task_b", "task_a")
end
//}... -
Rake
:: InvocationChain . append(task _ name , chain) -> Rake :: InvocationChain (9628.0) -
与えられたタスク名を第二引数の Rake::InvocationChain に追加します。
...の Rake::InvocationChain に追加します。
@param task_name タスク名を指定します。
@param chain 既に存在する Rake::InvocationChain のインスタンスを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_a......pp do
chain = Rake::InvocationChain::EMPTY
b = Rake::InvocationChain.append("task_a", chain)
b.to_s # => "TOP => task_a"
end
//}... -
Rake
:: Application # init(app _ name = & # 39;rake& # 39;) (9346.0) -
コマンドラインオプションとアプリケーション名を初期化します。
...ンドラインオプションとアプリケーション名を初期化します。
//emlist[例][ruby]{
# Rakefile での記載例とする
task default: :test
task :test
Rake.application.name # => "rake"
Rake.application.init("MyApp") # => ["default"]
Rake.application.name # => "MyApp"
//}... -
Rake
:: InvocationChain # member?(task _ name) -> bool (9328.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... -
Rake
:: InvocationChain . new(task _ name , tail) (9328.0) -
与えられたタスク名と一つ前の Rake::InvocationChain を用いて自身を初期化します。
...前の Rake::InvocationChain を用いて自身を初期化します。
@param task_name タスク名を指定します。
@param tail 一つ前の Rake::InvocationChain を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app d......o
tail = Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
tail.to_s # => "TOP => task_a"
b = Rake::InvocationChain.new("task_b", tail)
b.to_s # => "TOP => task_a => task_b"
end
//}... -
Rake
:: PackageTask # init(name , version) (625.0) -
自身の各属性にデフォルト値をセットします。
自身の各属性にデフォルト値をセットします。
@param name パッケージの名前を指定します。
@param version パッケージのバージョンを指定します。 -
Rake
:: PackageTask . new(name = nil , version = nil) {|t| . . . } -> Rake :: PackageTask (625.0) -
自身を初期化してタスクを定義します。
...emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_dir = "./pkg"
package_task.package_files.include("lib/**/*")
end
# rake -T を実行すると以下になる
# => rake clobber_package......# Remove package products
# rake package # Build all the packages
# rake repackage # Force a rebuild of the package files
//}... -
Rake
:: FileList # excluded _ from _ list?(file _ name) -> bool (364.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("te... -
Rake
:: TaskManager # synthesize _ file _ task(task _ name) -> Rake :: FileTask | nil (346.0) -
与えられたタスク名をもとにファイルタスクを合成します。
...//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do |task|
task.application.synthesize_file_task("sample_file") # => nil
IO.write("sample_file", "")
task.application.synthesize_file_task("sample_file") # => <Rake::FileTask sample_file =... -
Rake
:: FileList # egrep(pattern) {|filename , count , line| . . . } (343.0) -
与えられたパターンをファイルリストから grep のように検索します。
...attern 正規表現を指定します。
//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_list.eg... -
Rake
:: MakefileLoader # load(filename) (340.0) -
与えられた Makefile をロードします。
...します。
@param filename 読み込む Makefile の名前を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
require "rake/loaders/makefile"
task default: :test_rake_app
open "sample.mf", "w" do |io|
io << <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
b: b1 b2 b3 \
b4......a6 a7
c: c1
d: d1 d2 \
e f : e1 f1
g\ 0: g1 g\ 2 g\ 3 g4
SAMPLE_MF
end
task :test_rake_app do |task|
loader = Rake::MakefileLoader.new
loader.load("sample.mf")
p Rake::Task.task_defined?("a") # => true
p Rake::Task.tasks[0] # => <Rake::FileTask a => [a1, a2, a3, a4, a5, a6, a7]>
end
//}...