Class: ShipEngine::Errors::ErrorCode

Inherits:
Object
  • Object
show all
Defined in:
lib/shipengine/errors/error_code.rb

Overview

This class has the ability to return a specific error code.

#/

Class Method Summary collapse

Class Method Details

.get(key) ⇒ String

Returns error type.

Parameters:

  • key (Symbol | String)

Returns:

  • (String)

    error type



13
14
15
# File 'lib/shipengine/errors/error_code.rb', line 13

def self.get(key)
  @codes[key.upcase.to_sym]
end