Exception: Shark::ApiError
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.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(code, env) ⇒ ApiError
constructor
A new instance of ApiError.
- #message ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(code, env) ⇒ ApiError
Returns a new instance of ApiError.
9 10 11 12 |
# File 'lib/shark/error.rb', line 9 def initialize(code, env) @code = code @env = env end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/shark/error.rb', line 7 def code @code end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
7 8 9 |
# File 'lib/shark/error.rb', line 7 def env @env end |
Instance Method Details
#body ⇒ Object
14 15 16 |
# File 'lib/shark/error.rb', line 14 def body env[:body] end |
#message ⇒ Object
22 23 24 |
# File 'lib/shark/error.rb', line 22 def body.to_s end |
#url ⇒ Object
18 19 20 |
# File 'lib/shark/error.rb', line 18 def url env[:url] end |