Class: RailsTasker::Task::RunService

Inherits:
Object
  • Object
show all
Includes:
Serviceable
Defined in:
lib/rails_tasker/services/task/run_service.rb

Instance Method Summary collapse

Methods included from Serviceable

included

Instance Method Details

#call(version:) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/rails_tasker/services/task/run_service.rb', line 12

def call(version:)
  @version = version

  if task.nil?
    puts "Task with version: #{version} cannot be found...".magenta
    return
  else
    puts(
      "Running Version: #{task.timestamp} Name: #{task.task_name}".magenta
    )
    print 'Output: '.green, task.call, "\n\n"
  end
end