種類
- インスタンスメソッド (53)
- 特異メソッド (6)
- ライブラリ (2)
- 定数 (1)
- 文書 (1)
ライブラリ
- rake (51)
-
rake
/ packagetask (9)
クラス
-
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) - Ruby用語集 (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)
- rake (1)
- resolve (1)
- rubygems (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 (82006.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 (46321.0) -
デフォルトで Rakefile として扱うファイル名の配列を返します。
デフォルトで Rakefile として扱うファイル名の配列を返します。
'rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb' が指定されています。 -
RakeFileUtils
. nowrite _ flag -> bool (27619.0) -
この値が真の場合、実際のファイル書き込みをともなう操作は行いません。 そうでない場合、ファイル書き込みを行います。
この値が真の場合、実際のファイル書き込みをともなう操作は行いません。
そうでない場合、ファイル書き込みを行います。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :sample_file_task
file :sample_file_task do |t|
RakeFileUtils.nowrite_flag # => false
end
//} -
RakeFileUtils
. verbose _ flag -> bool (27619.0) -
この値が真の場合、詳細を表示します。
この値が真の場合、詳細を表示します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :sample_file_task
file :sample_file_task do |t|
# --verbose で rake を実行する
RakeFileUtils.verbose_flag # => true
end
//} -
Rake
:: TaskManager # last _ description -> String (18967.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_app2 do |task|
end
//} -
Rake
. original _ dir -> String (18919.0) -
Rake アプリケーションを開始したディレクトリを返します。
Rake アプリケーションを開始したディレクトリを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.original_dir # => "/path/to/dir"
end
//} -
Rake
:: Application # original _ dir -> String (18919.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
:: TaskManager # current _ scope -> Array (18919.0) -
現在のスコープを返します。
現在のスコープを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.current_scope # => LL()
end
//} -
rake (18775.0)
-
Rake というコマンドラインツールを扱うライブラリです。
Rake というコマンドラインツールを扱うライブラリです。
=== Rake とは
Rake は Make によく似た機能を持つ Ruby で書かれたシンプルなビルドツールです。
Rake は以下のような特徴を持っています。
* Rakefile (Rake における Makefile) は標準的な Ruby の文法で書くことができます。
XML ファイルを編集する必要はありませんし、Makefile の風変わりな文法 (タブだっけ?スペースだっけ?) に頭を悩ませる必要もありません。
* ユーザは必須条件をタスクに指定できます。
* Rake は暗黙のタスクを合成... -
Rake
:: PackageTask # package _ dir _ path -> String (18637.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
:: FileList # clear _ exclude -> self (18619.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" の双方の除外がクリアされる
file_list.clear_exclude
file_list # => ["test.r... -
Rake
:: FileList # excluded _ from _ list?(file _ name) -> bool (18619.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("t... -
Rake
:: FileList # import(array) -> self (18619.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_list.import(["test4.rb", "... -
Rake
:: FileList # resolve -> self (18619.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("*.java")
file_list.exclude("*.js")
file_... -
Rake
:: FileList # to _ ary -> Array (18619.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
:: InvocationChain # member?(task _ name) -> bool (18619.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
:: PackageTask # need _ tar -> bool (18619.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 (18619.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 (18619.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
:: PackageTask # package _ dir -> String (18619.0) -
パッケージに入れるファイルを保存するディレクトリ名を返します。
パッケージに入れるファイルを保存するディレクトリ名を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_dir # => "pkg"
end
//} -
Rake
:: TaskManager # intern(task _ class , task _ name) -> Rake :: Task (18619.0) -
タスクを検索します。
タスクを検索します。
タスクが見つかれば見つかったタスクを返します。
見つからなければ、与えられた型のタスクを作成して返します。
@param task_class タスクのクラスを指定します。
@param task_name タスクの名前を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do |task|
task.application.intern(Rake::Task, "test_rake_app") # => <Rake::... -
Ruby用語集 (18535.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
Ruby用語集
A B C D E F G I J M N O R S Y
a ka sa ta na ha ma ya ra wa
=== 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。
参照:d:spec/literal#percent
: 0 オリジン
: zero-based
番号が 0 から始まること。
例えば、
Array や Vector、Matrix などの要素の番号、
String における文字の位置、
といったものは 0 オリジンである。
: 1 オリジン
: one-based
... -
rubygems (18361.0)
-
RubyGems を扱うためのクラスやモジュールが定義されているライブラリです。
RubyGems を扱うためのクラスやモジュールが定義されているライブラリです。
===[a:gem_command] gem コマンドの使い方
$ gem help
RubyGems は Ruby のための高機能なパッケージ管理ツールです。
これはより多くの情報へのポインタを含んでいる基本的なヘルプメッセージです。
使用方法:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]
例:
... -
Rake
. application -> Rake :: Application (9727.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>,
# @imported=[],
# @last_description=nil,
# ... -
Rake
:: TaskManager # last _ comment -> String (9667.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_app2 do |task|
end
//} -
Rake
:: PackageTask . new(name = nil , version = nil) {|t| . . . } -> Rake :: PackageTask (9637.0) -
自身を初期化してタスクを定義します。
自身を初期化してタスクを定義します。
ブロックが与えられた場合は、自身をブロックパラメータとして
ブロックを評価します。
@param name パッケージ名を指定します。
@param version パッケージのバージョンを指定します。
':noversion' というシンボルを指定するとバージョン情報をセットしません。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |packa... -
Rake
:: Application # name -> String (9619.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 (9619.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 # top _ level _ tasks -> Array (9619.0) -
コマンドラインで指定されたタスクのリストを返します。
コマンドラインで指定されたタスクのリストを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.top_level_tasks # => ["default"]
end
//} -
Rake
:: FileList # ==(array) -> bool (9619.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 # existing -> Rake :: FileList (9619.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 # =>... -
Rake
:: FileList # ext(newext = & # 39;& # 39;) -> Rake :: FileList (9619.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.e... -
Rake
:: FileList # gsub!(pattern , replace) -> self (9619.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 # pathmap(spec = nil) -> Rake :: FileList (9619.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 # sub!(pattern , replace) -> self (9619.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
:: FileList # to _ a -> Array (9619.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 (9619.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
:: FileTask # timestamp -> Time | Rake :: LateTime (9619.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 # append(task _ name) -> Rake :: InvocationChain (9619.0) -
与えられたタスク名を追加して新しい Rake::InvocationChain を返します。
与えられたタスク名を追加して新しい Rake::InvocationChain を返します。
@param task_name 追加するタスク名を指定します。
@raise RuntimeError 循環したタスクの呼び出しを検出した場合に発生します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
invocation_chain= Rake::InvocationChain.new("task_a", Rake::InvocationChain:... -
Rake
:: InvocationChain # to _ s -> String (9619.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
:: InvocationChain . append(task _ name , chain) -> Rake :: InvocationChain (9619.0) -
与えられたタスク名を第二引数の Rake::InvocationChain に追加します。
与えられたタスク名を第二引数の Rake::InvocationChain に追加します。
@param task_name タスク名を指定します。
@param chain 既に存在する Rake::InvocationChain のインスタンスを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
chain = Rake::InvocationChain::EMPTY
b = Rake::InvocationChain.append... -
Rake
:: NameSpace # [](name) -> Rake :: Task (9619.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
//} -
Rake
:: NameSpace # tasks -> Array (9619.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
:: PackageTask # name -> String (9619.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 _ files -> Rake :: FileList (9619.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 # => []
package_task.package_files.include("*.rb")
package_... -
Rake
:: TaskArguments # names -> Array (9619.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
:: TaskArguments # new _ scope(names) -> Rake :: TaskArguments (9619.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", "name2"], ["value1", "value2"])
new_arguments = arguments.new_scope(["nam... -
Rake
:: TaskManager # [](task _ name , scopes = nil) -> Rake :: Task (9619.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 # define _ task(task _ class , *args) { . . . } -> Rake :: Task (9619.0) -
タスクを定義します。
タスクを定義します。
@param task_class タスククラスを指定します。
@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
:: TaskManager # in _ namespace(name) {|name _ space| . . . } -> Array (9619.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
end
//} -
Rake
:: TaskManager # lookup(task _ name , initial _ scope = nil) -> Rake :: Task | nil (9619.0) -
与えられたタスク名にマッチするタスクを検索します。
与えられたタスク名にマッチするタスクを検索します。
このメソッドは、ファイルタスクやルールを合成せずにタスクを探します。
特別なスコープ ('^' など) が存在します。スコープが省略された場合は
現在のスコープを使用します。
@param task_name タスク名を指定します。
@param initial_scope 検索するスコープを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do |task|
task.applicati... -
Rake
:: TaskManager # synthesize _ file _ task(task _ name) -> Rake :: FileTask | nil (9619.0) -
与えられたタスク名をもとにファイルタスクを合成します。
与えられたタスク名をもとにファイルタスクを合成します。
@param task_name タスク名を指定します。
@return 与えられたタスク名と同名のファイルが存在する場合は、ファイルタスクを作成して返します。
そうでない場合は nil を返します。
@raise RuntimeError タスクを合成できなかった場合に発生します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do |task|
task.applicatio... -
Rake
:: TaskManager # tasks -> Array (9619.0) -
全てのタスクリストを返します。
全てのタスクリストを返します。
//emlist[][ruby]{
# 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... -
Rake
:: Cloneable # clone -> object (9319.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"]
clone.exclude("a.c")
clone == file_list # => f... -
Rake
:: Cloneable # dup -> object (9319.0) -
自身と同じクラスのオブジェクトを作成後、自身のインスタンス変数を 全て新たに作成したオブジェクトにコピーします。
自身と同じクラスのオブジェクトを作成後、自身のインスタンス変数を
全て新たに作成したオブジェクトにコピーします。
//emlist[][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.ex... -
Rake
:: FileList # existing! -> self (9319.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.existing! # => ["tes... -
Rake
:: FileList # is _ a?(klass) -> bool (9319.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 (9319.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
:: FileTask # needed? -> bool (9319.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")
t... -
Rake
:: PackageTask # need _ zip -> bool (9319.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
:: TaskArguments # [](key) -> object (9319.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"
arguments["name2"] # => "value2"
end
/... -
Rake
:: TaskArguments # to _ hash -> Hash (9319.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=>"value1", :name2=>"value2"}
end
//} -
Rake
:: TaskArguments # with _ defaults(defaults) -> Hash (9319.0) -
パラメータにデフォルト値をセットします。
パラメータにデフォルト値をセットします。
@param defaults デフォルト値として使用するキーと値を格納したハッシュを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.to_hash ...