Class: Kumade::RakeTaskRunner
- Inherits:
-
Object
- Object
- Kumade::RakeTaskRunner
- Defined in:
- lib/kumade/rake_task_runner.rb
Instance Method Summary collapse
-
#initialize(task_name) ⇒ RakeTaskRunner
constructor
A new instance of RakeTaskRunner.
- #invoke ⇒ Object
Constructor Details
#initialize(task_name) ⇒ RakeTaskRunner
Returns a new instance of RakeTaskRunner.
3 4 5 |
# File 'lib/kumade/rake_task_runner.rb', line 3 def initialize(task_name) @task_name = task_name end |
Instance Method Details
#invoke ⇒ Object
7 8 9 10 11 12 |
# File 'lib/kumade/rake_task_runner.rb', line 7 def invoke return unless task_defined? Kumade.configuration.outputter.success("Running rake task: #{@task_name}") Rake::Task[@task_name].invoke if task_should_be_run? end |