Class: Kumade::RakeTaskRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/kumade/rake_task_runner.rb

Instance Method Summary collapse

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

#invokeObject



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