Class: AlprRuby::Error
- Inherits:
-
Object
- Object
- AlprRuby::Error
- Defined in:
- lib/alpr_ruby/error.rb
Constant Summary collapse
- ERROR_TYPES =
{ 400 => InvalidParametersError, 401 => UnauthorizedError, 402 => LimitUsageExceededError, 403 => TemporaryLimitExceeded, }
Instance Method Summary collapse
-
#initialize(code:) ⇒ Error
constructor
A new instance of Error.
- #render ⇒ Object
Constructor Details
#initialize(code:) ⇒ Error
Returns a new instance of Error.
15 16 17 |
# File 'lib/alpr_ruby/error.rb', line 15 def initialize(code:) @code = code end |
Instance Method Details
#render ⇒ Object
19 20 21 |
# File 'lib/alpr_ruby/error.rb', line 19 def render fail ERROR_TYPES[@code] end |