Exception: WifiWand::CommandSpawnError
- Defined in:
- lib/wifi_wand/errors.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
- #append_help_hint? ⇒ Boolean
-
#initialize(command:, reason:) ⇒ CommandSpawnError
constructor
A new instance of CommandSpawnError.
- #to_h ⇒ Object
Methods inherited from Error
#display_message, #exception, #message_for_display
Constructor Details
#initialize(command:, reason:) ⇒ CommandSpawnError
Returns a new instance of CommandSpawnError.
259 260 261 262 263 |
# File 'lib/wifi_wand/errors.rb', line 259 def initialize(command:, reason:) @command = command @reason = reason super("Could not start command '#{command}': #{reason}") end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
257 258 259 |
# File 'lib/wifi_wand/errors.rb', line 257 def command @command end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
257 258 259 |
# File 'lib/wifi_wand/errors.rb', line 257 def reason @reason end |
Instance Method Details
#append_help_hint? ⇒ Boolean
265 |
# File 'lib/wifi_wand/errors.rb', line 265 def append_help_hint? = false |
#to_h ⇒ Object
267 |
# File 'lib/wifi_wand/errors.rb', line 267 def to_h = { command: command, reason: reason } |