Module: PackageTracker::Carrier

Included in:
PackageTracker::Carriers::FedEx, PackageTracker::Carriers::UPS, PackageTracker::Carriers::USPS
Defined in:
lib/package_tracker/carrier.rb

Instance Method Summary collapse

Instance Method Details

#validate_credentials!(credentials) ⇒ Object



3
4
5
6
7
# File 'lib/package_tracker/carrier.rb', line 3

def validate_credentials!(credentials)
  required_credentials.each do |key| 
    raise MissingCredentialsError, "You must provide a #{key} in the options" unless credentials && credentials[key]
  end
end