Exception: Croudia::Error::ConnectionError
- Inherits:
-
Croudia::Error
- Object
- StandardError
- Croudia::Error
- Croudia::Error::ConnectionError
- Defined in:
- lib/croudia/error.rb
Overview
Error connected to server
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
-
#initialize(env) ⇒ ConnectionError
constructor
A new instance of ConnectionError.
Constructor Details
#initialize(env) ⇒ ConnectionError
Returns a new instance of ConnectionError.
28 29 30 31 32 33 |
# File 'lib/croudia/error.rb', line 28 def initialize(env) @code = env[:status] @error = env[:body]['error'] rescue nil @env = env super(@error) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
26 27 28 |
# File 'lib/croudia/error.rb', line 26 def code @code end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
26 27 28 |
# File 'lib/croudia/error.rb', line 26 def env @env end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
26 27 28 |
# File 'lib/croudia/error.rb', line 26 def error @error end |