Class: ShipEngine::Errors::ErrorSource

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

Overview

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

#/

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_source.rb', line 13

def self.get(key)
  @sources[key.upcase.to_sym] || @sources[:SHIPENGINE]
end