Exception: Cisco::CiscoError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Cisco::CiscoError
- Defined in:
- lib/cisco_node_utils/exceptions.rb
Overview
Generic class for exceptions raised by this module
Direct Known Subclasses
Instance Attribute Summary collapse
-
#kwargs ⇒ Object
readonly
Returns the value of attribute kwargs.
Instance Method Summary collapse
-
#initialize(message = nil, **kwargs) ⇒ CiscoError
constructor
A new instance of CiscoError.
- #method_missing(method_sym, *args, **kwargs, &block) ⇒ Object
- #respond_to?(method_sym, include_private = false) ⇒ Boolean
Constructor Details
#initialize(message = nil, **kwargs) ⇒ CiscoError
Returns a new instance of CiscoError.
33 34 35 36 |
# File 'lib/cisco_node_utils/exceptions.rb', line 33 def initialize(=nil, **kwargs) @kwargs = kwargs super() end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_sym, *args, **kwargs, &block) ⇒ Object
42 43 44 |
# File 'lib/cisco_node_utils/exceptions.rb', line 42 def method_missing(method_sym, *args, **kwargs, &block) @kwargs.key?(method_sym) ? @kwargs[method_sym] : super end |
Instance Attribute Details
#kwargs ⇒ Object (readonly)
Returns the value of attribute kwargs.
31 32 33 |
# File 'lib/cisco_node_utils/exceptions.rb', line 31 def kwargs @kwargs end |
Instance Method Details
#respond_to?(method_sym, include_private = false) ⇒ Boolean
38 39 40 |
# File 'lib/cisco_node_utils/exceptions.rb', line 38 def respond_to?(method_sym, include_private=false) @kwargs.key?(method_sym) ? true : super end |