Sha256: 2e63d77a7ef28eaf99bcc65802a9001fe33999f3340bff7f800058375f23740c
Contents?: true
Size: 460 Bytes
Versions: 2
Compression:
Stored size: 460 Bytes
Contents
module Seko class Tracking attr_accessor :carrier DPD = "http://www.dpd.co.uk/apps/tracking/?reference=:tracking_number&postcode=#results" 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
seko-0.0.3 | lib/seko/tracking.rb |
seko-0.0.2 | lib/seko/tracking.rb |