Sha256: 746b1bf6179292f233c463b878328cdbcea5202d19a7fbd91950bd97fdacb3ff

Contents?: true

Size: 287 Bytes

Versions: 2

Compression:

Stored size: 287 Bytes

Contents

module PackageTracker
  module Carriers
    module USPS
      extend Carrier
      extend self
      
      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
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
package_tracker-0.0.3 lib/package_tracker/carriers/usps.rb
package_tracker-0.0.2 lib/package_tracker/carriers/usps.rb