Exception: Datacenter::Shell::CommandError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/datacenter/shell/command_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, error) ⇒ CommandError

Returns a new instance of CommandError.



7
8
9
10
# File 'lib/datacenter/shell/command_error.rb', line 7

def initialize(command, error)
  @command = command
  @error = error
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



5
6
7
# File 'lib/datacenter/shell/command_error.rb', line 5

def command
  @command
end

#errorObject (readonly)

Returns the value of attribute error.



5
6
7
# File 'lib/datacenter/shell/command_error.rb', line 5

def error
  @error
end

Instance Method Details

#messageObject



12
13
14
# File 'lib/datacenter/shell/command_error.rb', line 12

def message
  "#{command}\n#{error}"
end