Class: Lingo24::Exception
- Inherits:
-
StandardError
- Object
- StandardError
- Lingo24::Exception
- Defined in:
- lib/lingo24/exception.rb
Overview
Custom Exception
class for errors returned from the Lingo24 Translation APIs.
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code, msg) ⇒ Exception
constructor
Creates a new
Language
. -
#message ⇒ Object
Overrides default
message
to return the exception’s message.
Constructor Details
#initialize(code, msg) ⇒ Exception
Creates a new Language
.
Parameters: code
- a string containing the status code of the message. msg
- a string containing the exception message.
12 13 14 15 |
# File 'lib/lingo24/exception.rb', line 12 def initialize(code, msg) @code = code @message = msg end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
5 6 7 |
# File 'lib/lingo24/exception.rb', line 5 def code @code end |
Instance Method Details
#message ⇒ Object
Overrides default message
to return the exception’s message.
18 19 20 |
# File 'lib/lingo24/exception.rb', line 18 def @message end |