Exception: Datacenter::Shell::CommandError
- Inherits:
-
StandardError
- Object
- StandardError
- Datacenter::Shell::CommandError
- Defined in:
- lib/datacenter/shell/command_error.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
-
#initialize(command, error) ⇒ CommandError
constructor
A new instance of CommandError.
- #message ⇒ Object
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
#command ⇒ Object (readonly)
Returns the value of attribute command.
5 6 7 |
# File 'lib/datacenter/shell/command_error.rb', line 5 def command @command end |
#error ⇒ Object (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
#message ⇒ Object
12 13 14 |
# File 'lib/datacenter/shell/command_error.rb', line 12 def "#{command}\n#{error}" end |