Exception: Tomo::SSH::UnsupportedVersionError

Inherits:
Error
  • Object
show all
Defined in:
lib/tomo/ssh/unsupported_version_error.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#host

Instance Method Summary collapse

Methods inherited from Error

raise_with

Methods included from Colors

enabled?

Instance Attribute Details

#commandObject

Returns the value of attribute command.



6
7
8
# File 'lib/tomo/ssh/unsupported_version_error.rb', line 6

def command
  @command
end

#expected_versionObject

Returns the value of attribute expected_version.



6
7
8
# File 'lib/tomo/ssh/unsupported_version_error.rb', line 6

def expected_version
  @expected_version
end

Instance Method Details

#to_consoleObject



8
9
10
11
12
13
14
# File 'lib/tomo/ssh/unsupported_version_error.rb', line 8

def to_console
  msg = <<~ERROR
    Expected #{yellow(command)} to return #{blue(expected_version)} or higher.
  ERROR

  [msg, super].join("\n")
end