Class: ShipEngine::Exceptions::ErrorType

Inherits:
Object
  • Object
show all
Defined in:
lib/shipengine/exceptions/error_type.rb

Overview

This class has the ability to return a specific error type. #/

Class Method Summary collapse

Class Method Details

.get(key) ⇒ Symbol

Returns error type.

Parameters:

  • key (Symbol)

Returns:

  • (Symbol)

    error type



11
12
13
# File 'lib/shipengine/exceptions/error_type.rb', line 11

def self.get(key)
  @types[key]
end

.get_by_str(str_key) ⇒ Symbol

Returns error type.

Parameters:

  • str_key (String)

Returns:

  • (Symbol)

    error type



17
18
19
# File 'lib/shipengine/exceptions/error_type.rb', line 17

def self.get_by_str(str_key)
  get(str_key.upcase.to_sym)
end