Sha256: f1dc647f6ba33ccdd928c54e274e1ae3269d857150ad8a65e0fbd0c8819ff5aa
Contents?: true
Size: 636 Bytes
Versions: 1
Compression:
Stored size: 636 Bytes
Contents
module Trebbianno class Tracking attr_accessor :carrier FEDEX = "http://printtracking.fedex.com/trackOrder.do?gtns=:tracking_number" USPS = "https://tools.usps.com/go/TrackConfirmAction.action?tLabels=:tracking_number" UPS = "http://wwwapps.ups.com/WebTracking/track?trackNums=123412341234&track.x=Track" def initialize(carrier, tracking_number) @carrier = carrier @tracking_number = tracking_number end def carrier_destination self.class.const_get(carrier.upcase) end def url carrier_destination.gsub(':tracking_number', @tracking_number) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
trebbianno-ruby-api-0.0.1 | lib/trebbianno/tracking.rb |