Exception: WifiWand::CommandSpawnError

Inherits:
Error
  • Object
show all
Defined in:
lib/wifi_wand/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#commandObject (readonly)

Returns the value of attribute command.



257
258
259
# File 'lib/wifi_wand/errors.rb', line 257

def command
  @command
end

#reasonObject (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

Returns:

  • (Boolean)


265
# File 'lib/wifi_wand/errors.rb', line 265

def append_help_hint? = false

#to_hObject



267
# File 'lib/wifi_wand/errors.rb', line 267

def to_h = { command: command, reason: reason }