Ruby 1.9.2 リファレンスマニュアル > ライブラリ一覧 > rakeライブラリ > Rake::Taskクラス

class Rake::Task

クラスの継承リスト: Rake::Task < Object < Kernel < BasicObject

要約

タスクは Rakefile における基本単位です。

タスクは一つ以上の関連するアクションと事前タスクを持ちます。 タスクを実行すると、まず始めに全ての事前タスクを一度だけ実行してから 自身のアクションを実行します。

タスクは通常 Kernel#task, Kernel#file という便利なメソッドを使用して定義します。

特異メソッド

定義 説明
self[task_name] -> Rake::Task

与えられた名前のタスクを返します。

clear

タスクリストをクリアします。

create_rule(*args) { ... } -> Rake::Task

タスクを合成するためのルールを作成します。

define_task(*args) { ... } -> Rake::Task

与えられたパラメータと省略可能なブロックを用いてタスクを定義します。

new(task_name, app)

与えられたタスク名とアプリケーションで自身を初期化します。

scope_name(scope, task_name) -> String

与えられたスコープとタスク名をコロンで連結して返します。

task_defined?(task_name) -> bool

与えられたタスク名が既に定義されている場合は真を返します。 そうでない場合は偽を返します。

tasks -> Array

定義されているタスクのリストを返します。

インスタンスメソッド

定義 説明
actions -> Array

自身に関連するアクションのリストを返します。

add_description(description)

自身に詳細説明を追加します。

application -> Rake::Application

自身を所有している Rake::Application のインスタンスを返します。

application=(app)

自身を所有している Rake::Application のインスタンスをセットします。

arg_description
arg_names -> Array

自身のパラメータ名のリストを返します。

clear -> self

自身に登録されているアクションと事前タスクをクリアします。

clear_actions -> self

自身に登録されているアクションをクリアします。

clear_prerequisites -> self

自身に登録されている事前タスクをクリアします。

comment -> String

自身の短いコメントを返します。

comment=(comment)

自身のコメントをセットします。

enhance(deps = nil) { ... } -> self

自身に事前タスクとアクションを追加します。

execute(args = nil)

自身に関連付けられているアクションを実行します。

full_comment -> String

自身のコメントを全て返します。

inspect -> String

自身の情報を人間に読める形式で返します。

investigation -> String

自身の詳しい内部状態を文字列化して返します。

invoke(*args)

必要であれば自身を実行します。最初に事前タスクを実行します。

name -> String

ネームスペースを含むタスクの名前を返します。

needed? -> true

このタスクが必要ならば真を返します。

prerequisites -> Array

事前タスクのリストを返します。

reenable -> false

自身をもう一度実行出来るようにします。

scope
set_arg_names(args)

自身のパラメータの名前のリストをセットします。

source -> String

Rake::Task#sources の最初の要素を返します。

sources -> Array

自身が依存するファイルのリストを返します。

sources=(sources)

自身が依存するファイルのリストをセットします。

timestamp -> Time

自身のタイムスタンプを返します。

to_s -> String

自身の名前を返します。

継承したメソッド

! != == === =~ __id__ __send__ _dump class clone dclone display enum_for eql? equal? extend freeze frozen? hash initialize initialize_copy instance_eval instance_exec instance_of? instance_variable_defined? instance_variable_get instance_variable_set instance_variables is_a? marshal_dump marshal_load method method_missing methods must_be must_be_close_to must_be_empty must_be_instance_of must_be_kind_of must_be_nil must_be_same_as must_be_within_epsilon must_equal must_include must_match must_raise must_respond_to must_send must_throw nil? pretty_inspect pretty_print pretty_print_cycle pretty_print_inspect pretty_print_instance_variables private_methods protected_methods public_methods remove_instance_variable respond_to? respond_to_missing? singleton_class singleton_method_added singleton_method_removed singleton_method_undefined singleton_methods taint tainted? tap to_a to_ary to_hash to_int to_io to_proc to_regexp to_str to_yaml to_yaml_properties to_yaml_style trust untaint untrust untrusted? wont_be wont_be_close_to wont_be_empty wont_be_instance_of wont_be_kind_of wont_be_nil wont_be_same_as wont_be_within_epsilon wont_equal wont_include wont_match wont_respond_to