Exception: Tomo::Console::NonInteractiveError

Inherits:
Error
  • Object
show all
Defined in:
lib/tomo/console/non_interactive_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

raise_with

Methods included from Tomo::Colors

enabled?

Instance Attribute Details

#ci_varObject

Returns the value of attribute ci_var.



6
7
8
# File 'lib/tomo/console/non_interactive_error.rb', line 6

def ci_var
  @ci_var
end

#taskObject

Returns the value of attribute task.



6
7
8
# File 'lib/tomo/console/non_interactive_error.rb', line 6

def task
  @task
end

Instance Method Details

#to_consoleObject



8
9
10
11
12
13
# File 'lib/tomo/console/non_interactive_error.rb', line 8

def to_console
  error = ""
  error += "#{operation_name} requires an interactive console."
  error += "\n\n#{seems_like_ci}" if ci_var
  error
end