Exception: AlmaApi::Error
- Inherits:
-
StandardError
- Object
- StandardError
- AlmaApi::Error
- Defined in:
- lib/alma_api.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(message = nil, code = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message = nil, code = nil) ⇒ Error
Returns a new instance of Error.
18 19 20 21 |
# File 'lib/alma_api.rb', line 18 def initialize(=nil, code=nil) @code = code.presence || DEFAULT_ERROR_CODE super(.presence || DEFAULT_ERROR_MESSAGE) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
16 17 18 |
# File 'lib/alma_api.rb', line 16 def code @code end |