Exception: Tomo::Runtime::UnknownTaskError

Inherits:
Error
  • Object
show all
Defined in:
lib/tomo/runtime/unknown_task_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

raise_with

Methods included from Colors

enabled?

Instance Attribute Details

#known_tasksObject

Returns the value of attribute known_tasks.



6
7
8
# File 'lib/tomo/runtime/unknown_task_error.rb', line 6

def known_tasks
  @known_tasks
end

#unknown_taskObject

Returns the value of attribute unknown_task.



6
7
8
# File 'lib/tomo/runtime/unknown_task_error.rb', line 6

def unknown_task
  @unknown_task
end

Instance Method Details

#to_consoleObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/tomo/runtime/unknown_task_error.rb', line 8

def to_console
  error = <<~ERROR
    #{yellow(unknown_task)} is not a recognized task.
    To see a list of all available tasks, run #{blue('tomo tasks')}.
  ERROR

  sugg = spelling_suggestion || missing_plugin_suggestion
  error += sugg if sugg
  error
end