Exception: WifiWand::NetworkConnectionError
- Defined in:
- lib/wifi_wand/errors.rb
Instance Attribute Summary collapse
-
#network_name ⇒ Object
readonly
Returns the value of attribute network_name.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(network_name:, reason: nil, source: nil) ⇒ NetworkConnectionError
constructor
A new instance of NetworkConnectionError.
Methods inherited from Error
#append_help_hint?, #display_message, #exception, #message_for_display
Constructor Details
#initialize(network_name:, reason: nil, source: nil) ⇒ NetworkConnectionError
Returns a new instance of NetworkConnectionError.
44 45 46 47 48 49 50 51 |
# File 'lib/wifi_wand/errors.rb', line 44 def initialize(network_name:, reason: nil, source: nil) @network_name = network_name @reason = reason @source = source msg = "Failed to connect to network '#{network_name}'" msg += ": #{reason}" if reason super(msg) end |
Instance Attribute Details
#network_name ⇒ Object (readonly)
Returns the value of attribute network_name.
42 43 44 |
# File 'lib/wifi_wand/errors.rb', line 42 def network_name @network_name end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
42 43 44 |
# File 'lib/wifi_wand/errors.rb', line 42 def reason @reason end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
42 43 44 |
# File 'lib/wifi_wand/errors.rb', line 42 def source @source end |