Exception: Pinterest::Errors::BaseError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Pinterest::Errors::BaseError
- Defined in:
- lib/pinterest/errors.rb
Overview
The base error.
Direct Known Subclasses
AuthorizationError, BadRequestError, MethodNotAllowedError, NotFoundError, NotImplementedError, PermissionsError, RateLimitError, ServerError, TimeoutError
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#env ⇒ Object
Returns the value of attribute env.
-
#reason ⇒ Object
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(code, reason, env) ⇒ BaseError
constructor
Creates a new error.
Constructor Details
#initialize(code, reason, env) ⇒ BaseError
Creates a new error.
30 31 32 33 34 35 |
# File 'lib/pinterest/errors.rb', line 30 def initialize(code, reason, env) super("[#{code}] #{reason}") @code = code @reason = reason @env = env end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
23 24 25 |
# File 'lib/pinterest/errors.rb', line 23 def code @code end |
#env ⇒ Object
Returns the value of attribute env
23 24 25 |
# File 'lib/pinterest/errors.rb', line 23 def env @env end |
#reason ⇒ Object
Returns the value of attribute reason
23 24 25 |
# File 'lib/pinterest/errors.rb', line 23 def reason @reason end |