Class: ShipEngine::Exceptions::ErrorCode
- Inherits:
-
Object
- Object
- ShipEngine::Exceptions::ErrorCode
- Defined in:
- lib/shipengine/exceptions/error_code.rb
Overview
This class has the ability to return a specific error code.
#/
Class Method Summary collapse
-
.get(key) ⇒ Symbol
Error code.
-
.get_by_str(str_key) ⇒ Symbol
Error code.
Class Method Details
.get(key) ⇒ Symbol
Returns error code.
13 14 15 |
# File 'lib/shipengine/exceptions/error_code.rb', line 13 def self.get(key) @codes[key] end |
.get_by_str(str_key) ⇒ Symbol
Returns error code.
19 20 21 |
# File 'lib/shipengine/exceptions/error_code.rb', line 19 def self.get_by_str(str_key) get(str_key.upcase.to_sym) end |