種類
- インスタンスメソッド (53)
- 特異メソッド (6)
- 定数 (1)
クラス
-
Rake
:: Application (6) -
Rake
:: FileList (16) -
Rake
:: FileTask (2) -
Rake
:: InvocationChain (4) -
Rake
:: NameSpace (2) -
Rake
:: PackageTask (9) -
Rake
:: TaskArguments (5)
モジュール
- Rake (2)
-
Rake
:: Cloneable (2) -
Rake
:: TaskManager (10) - RakeFileUtils (2)
キーワード
- == (1)
-
DEFAULT
_ RAKEFILES (1) - [] (3)
- append (2)
- application (1)
-
clear
_ exclude (1) - clone (1)
-
current
_ scope (1) -
define
_ task (1) - dup (1)
-
excluded
_ from _ list? (1) - existing (1)
- existing! (1)
- ext (1)
- gsub! (1)
- import (1)
-
in
_ namespace (1) - intern (1)
-
is
_ a? (1) -
kind
_ of? (1) -
last
_ comment (1) -
last
_ description (1) - lookup (1)
- member? (1)
- name (2)
- names (1)
-
need
_ tar (1) -
need
_ tar _ bz2 (1) -
need
_ tar _ gz (1) -
need
_ zip (1) - needed? (1)
- new (1)
-
new
_ scope (1) -
nowrite
_ flag (1) -
original
_ dir (2) -
package
_ dir (1) -
package
_ dir _ path (1) -
package
_ files (1) - pathmap (1)
- resolve (1)
- sub! (1)
-
synthesize
_ file _ task (1) - tasks (2)
-
to
_ a (1) -
to
_ ary (1) -
to
_ hash (1) -
to
_ s (2) -
top
_ level _ tasks (1) -
verbose
_ flag (1) -
with
_ defaults (1)
検索結果
先頭5件
-
Rake
:: Application # rakefile -> String (64312.0) -
実際に使用されている Rakefile の名前を返します。
...実際に使用されている Rakefile の名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.rakefile # => "Rakefile"
end
//}... -
Rake
:: Application :: DEFAULT _ RAKEFILES -> Array (37327.0) -
デフォルトで Rakefile として扱うファイル名の配列を返します。
...デフォルトで Rakefile として扱うファイル名の配列を返します。
'rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb' が指定されています。... -
Rake
:: TaskManager # define _ task(task _ class , *args) { . . . } -> Rake :: Task (28561.0) -
タスクを定義します。
...s タスククラスを指定します。
@param args タスクに渡すパラメータを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.define_task(Rake::Task, :t) # => <Rake::Task t => []>
end
//}... -
Rake
:: FileTask # timestamp -> Time | Rake :: LateTime (28543.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
:: Application # options -> OpenStruct (27943.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=false, load_system=false, nosearch=false, rakelib=["rakelib"], show_all_tasks=false, show_prereqs=false, show_task_pattern=nil, show_tasks=nil, silent=false, suppress_backtrace_pattern=nil, thread_pool_size=8, trace=false, trace_output=#... -
RakeFileUtils
. nowrite _ flag -> bool (27943.0) -
この値が真の場合、実際のファイル書き込みをともなう操作は行いません。 そうでない場合、ファイル書き込みを行います。
...ァイル書き込みをともなう操作は行いません。
そうでない場合、ファイル書き込みを行います。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :sample_file_task
file :sample_file_task do |t|
RakeFileUtils.nowrite_flag # => false
end
//}... -
Rake
:: TaskManager # synthesize _ file _ task(task _ name) -> Rake :: FileTask | nil (27925.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
:: TaskManager # tasks -> Array (27925.0) -
全てのタスクリストを返します。
...{
# Rakefile での記載例とする
require 'pp'
task default: :test_rake_app2
task :test_rake_app1 do |task|
end
task :test_rake_app2 do |task|
pp task.application.tasks
# => [<Rake::Task default => [test_rake_app2]>,
# <Rake::Task test_rake_app1 => []>,
# <Rake::Task test_rake_a... -
Rake
:: PackageTask # need _ tar -> bool (27922.0) -
この値が真である場合は gzip した tar ファイル (tgz) を作成します。 デフォルトは偽です。
...が真である場合は gzip した tar ファイル (tgz) を作成します。
デフォルトは偽です。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.need_tar # => false
end
//}... -
Rake
:: PackageTask # need _ tar _ bz2 -> bool (27922.0) -
この値が真である場合は bzip2 した tar ファイル (tar.bz2) を作成します。 デフォルトは偽です。
...ある場合は bzip2 した tar ファイル (tar.bz2) を作成します。
デフォルトは偽です。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.need_tar_bz2 # => false
end
//}... -
Rake
:: PackageTask # need _ tar _ gz -> bool (27922.0) -
この値が真である場合は gzip した tar ファイル (tar.gz) を作成します。 デフォルトは偽です。
...である場合は gzip した tar ファイル (tar.gz) を作成します。
デフォルトは偽です。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.need_tar_gz # => false
end
//}... -
Rake
. application -> Rake :: Application (19351.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
:: TaskManager # last _ comment -> String (18973.0) -
Rakefile 内の最新の詳細説明を追跡するためのメソッドです。
...
Rakefile 内の最新の詳細説明を追跡するためのメソッドです。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app1
desc "test1"
task :test_rake_app1 do |task|
p task.application.last_description # => "test2"
end
desc "test2"
task :test_rake_a... -
Rake
:: TaskManager # last _ description -> String (18973.0) -
Rakefile 内の最新の詳細説明を追跡するためのメソッドです。
...
Rakefile 内の最新の詳細説明を追跡するためのメソッドです。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app1
desc "test1"
task :test_rake_app1 do |task|
p task.application.last_description # => "test2"
end
desc "test2"
task :test_rake_a... -
Rake
:: PackageTask # package _ dir _ path -> String (18940.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 # top _ level _ tasks -> Array (18925.0) -
コマンドラインで指定されたタスクのリストを返します。
...コマンドラインで指定されたタスクのリストを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.top_level_tasks # => ["default"]
end
//}... -
Rake
:: FileList # excluded _ from _ list?(file _ name) -> bool (18925.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
:: FileList # existing -> Rake :: FileList (18925.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.... -
Rake
:: FileList # existing! -> self (18925.0) -
自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含むように自身を変更して返します。
...みを
含むように自身を変更して返します。
//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... -
Rake
:: FileList # ext(newext = & # 39;& # 39;) -> Rake :: FileList (18925.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"... -
Rake
:: FileList # import(array) -> self (18925.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_li... -
Rake
:: FileList # pathmap(spec = nil) -> Rake :: FileList (18925.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",... -
Rake
:: FileList # to _ a -> Array (18925.0) -
内部的な配列を返します。
...内部的な配列を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.to_a # => ["a.c", "b.c"]
end
//}... -
Rake
:: FileList # to _ ary -> Array (18925.0) -
内部的な配列を返します。
...内部的な配列を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.to_a # => ["a.c", "b.c"]
end
//}... -
Rake
:: FileList # to _ s -> String (18925.0) -
全ての要素をスペースで連結した文字列を返します。
...全ての要素をスペースで連結した文字列を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.to_s # => "a.c b.c"
end
//}... -
Rake
:: InvocationChain # to _ s -> String (18925.0) -
トップレベルのタスクから自身までの依存関係を文字列として返します。
...での依存関係を文字列として返します。
//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.to_s # => "TOP => task_a"
end
//... -
Rake
:: NameSpace # tasks -> Array (18925.0) -
タスクのリストを返します。
...タスクのリストを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
namespace :ns do |ns|
task :ts1 do
end
task :ts2 do
end
ns.tasks # => [<Rake::Task ns:ts1 => []>, <Rake::Task ns:ts2 => []>]
end
//}... -
Rake
:: TaskArguments # to _ hash -> Hash (18925.0) -
パラメータ名と対応する値を格納したハッシュを返します。
...メータ名と対応する値を格納したハッシュを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.to_hash # => {:name1=>"v... -
Rake
:: TaskArguments # with _ defaults(defaults) -> Hash (18925.0) -
パラメータにデフォルト値をセットします。
...て使用するキーと値を格納したハッシュを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.to_hash... -
Rake
:: TaskManager # current _ scope -> Array (18925.0) -
現在のスコープを返します。
...現在のスコープを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.current_scope # => LL()
end
//}... -
Rake
:: TaskManager # intern(task _ class , task _ name) -> Rake :: Task (18925.0) -
タスクを検索します。
...//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do |task|
task.application.intern(Rake::Task, "test_rake_app") # => <Rake::Task test_rake_app => []>
task.application.intern(Rake::Task, "sample_task") # => <Rake::Task sample_task => []>... -
RakeFileUtils
. verbose _ flag -> bool (18643.0) -
この値が真の場合、詳細を表示します。
...この値が真の場合、詳細を表示します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :sample_file_task
file :sample_file_task do |t|
# --verbose で rake を実行する
RakeFileUtils.verbose_flag # => true
end
//}... -
Rake
:: TaskManager # [](task _ name , scopes = nil) -> Rake :: Task (10225.0) -
与えられたタスク名にマッチするタスクを検索します。
...す。
@param task_name タスク名を指定します。
@param scopes スコープを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application["test_rake_app"] # => <Rake::Task test_rake_app => []>
end
//}... -
Rake
:: TaskManager # lookup(task _ name , initial _ scope = nil) -> Rake :: Task | nil (10225.0) -
与えられたタスク名にマッチするタスクを検索します。
...名を指定します。
@param initial_scope 検索するスコープを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do |task|
task.application.lookup("test_rake_app") # => <Rake::Task test_rake_app => []>
end
//}... -
Rake
:: PackageTask . new(name = nil , version = nil) {|t| . . . } -> Rake :: PackageTask (9961.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
:: TaskArguments # new _ scope(names) -> Rake :: TaskArguments (9943.0) -
与えられたパラメータ名のリストを使用して新しい Rake::TaskArguments を作成します。
...リストを使用して新しい Rake::TaskArguments を作成します。
@param names パラメータ名のリストを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "n......ame2"], ["value1", "value2"])
new_arguments = arguments.new_scope(["name3", "name4"])
p new_arguments # => #<Rake::TaskArguments >
p new_arguments.names # => ["name3", "name4"]
end
//}... -
Rake
:: Application # name -> String (9925.0) -
アプリケーションの名前を返します。通常は 'rake' という名前を返します。
...アプリケーションの名前を返します。通常は 'rake' という名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.name # => "rake"
end
//}... -
Rake
:: Application # original _ dir -> String (9925.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 # gsub!(pattern , replace) -> self (9925.0) -
自身に含まれるファイルリストのそれぞれのエントリに対して 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... -
Rake
:: FileList # sub!(pattern , replace) -> self (9925.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... -
Rake
:: InvocationChain # append(task _ name) -> Rake :: InvocationChain (9925.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 # member?(task _ name) -> bool (9925.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 . append(task _ name , chain) -> Rake :: InvocationChain (9925.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
:: TaskArguments # [](key) -> object (9925.0) -
与えられたパラメータ名に対応する値を返します。
...を返します。
@param key パラメータの名前を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments["name1"] # => "value1"... -
Rake
:: PackageTask # name -> String (9922.0) -
バージョン情報を含まないパッケージの名前を返します。
...バージョン情報を含まないパッケージの名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.name # => "sample"
end
//}... -
Rake
:: PackageTask # package _ dir -> String (9922.0) -
パッケージに入れるファイルを保存するディレクトリ名を返します。
...パッケージに入れるファイルを保存するディレクトリ名を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_dir # => "pkg"
end
//}... -
Rake
:: PackageTask # package _ files -> Rake :: FileList (9922.0) -
パッケージに含むファイルリストを返します。
...パッケージに含むファイルリストを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
IO.write("test1.rb", "test")
IO.write("test2.rb", "test")
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_files # =>... -
Rake
:: FileList # ==(array) -> bool (9625.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 # clear _ exclude -> self (9625.0) -
登録されている除外リストをクリアします。
...登録されている除外リストをクリアします。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test.rb", "test.bak")
file_list.exclude("test.rb")
# DEFAULT_IGNORE_PATTERNS と "test.rb" の双... -
Rake
:: FileList # is _ a?(klass) -> bool (9625.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 # kind _ of?(klass) -> bool (9625.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 # resolve -> self (9625.0) -
追加リストと除外リストを評価します。
...ストと除外リストを評価します。
//emlist[][ruby]{
# Rakefile での記載例とする
IO.write("test.rb", "test")
IO.write("test.java", "test")
IO.write("test.js", "test")
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("*.rb")
file_list.include("*.... -
Rake
:: FileTask # needed? -> bool (9625.0) -
このタスクが必要である場合は真を返します。 そうでない場合は偽を返します。
...作成しようとしているファイルが古い場合に真を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: "test.txt"
file "test.txt" do |task|
Rake.application.options.build_all = false
task.needed? # => true
IO.write("test.txt", "test")
task.nee... -
Rake
:: TaskArguments # names -> Array (9625.0) -
パラメータ名のリストを返します。
...パラメータ名のリストを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.names # => ["name1", "name2"]
end
//}... -
Rake
:: TaskManager # in _ namespace(name) {|name _ space| . . . } -> Array (9625.0) -
与えられた名前の名前空間でブロックを評価します。
...評価します。
@param name 名前を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
namespace :sample do
def hoge
puts "hoge"
end
end
task :test_rake_app do
task.application.in_namespace("sample") do
hoge # => "hoge"
end... -
Rake
:: PackageTask # need _ zip -> bool (9622.0) -
この値が真である場合は zip ファイルを作成します。 デフォルトは偽です。
...この値が真である場合は zip ファイルを作成します。
デフォルトは偽です。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.need_zip # => false
end
//}... -
Rake
:: Cloneable # dup -> object (943.0) -
自身と同じクラスのオブジェクトを作成後、自身のインスタンス変数を 全て新たに作成したオブジェクトにコピーします。
...][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.freeze
dup = file_list.dup
clone = file_list.clone
dup.exclude("a.c") # => ["b.c"]
clone.exclude("a.c") # => can't modify frozen Rake::FileList... -
Rake
. original _ dir -> String (925.0) -
Rake アプリケーションを開始したディレクトリを返します。
...
Rake アプリケーションを開始したディレクトリを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.original_dir # => "/path/to/dir"
end
//}... -
Rake
:: Cloneable # clone -> object (925.0) -
自身を複製します。
...ズされていれば返されるオブジェクトもフリーズされています。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
clone = file_list.clone
clone # => ["a.c", "b.c... -
Rake
:: NameSpace # [](name) -> Rake :: Task (925.0) -
与えられた名前のタスクを返します。
...のタスクを返します。
@param name タスクの名前を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
namespace :ns do |ns|
task :ts1 do
end
task :ts2 do
end
ns[:ts1] # => <Rake::Task ns:ts1 => []>
ns[:ts2] # => <Rake::Task ns:ts2 => []>
end
//}...