Module: PackageTracker::Carriers::USPS

Extended by:
PackageTracker::Carrier, USPS
Included in:
USPS
Defined in:
lib/package_tracker/carriers/usps.rb

Instance Method Summary collapse

Methods included from PackageTracker::Carrier

validate_credentials!

Instance Method Details

#match(tracking_number) ⇒ Object



7
8
9
# File 'lib/package_tracker/carriers/usps.rb', line 7

def match(tracking_number)
  tracking_number =~ /^\d{20}$/ || tracking_number =~ /^\d{30}$/ || tracking_number =~ /^[A-Za-z]{2}\d{9}[A-Za-z]{2}$/
end