Module: Stalkr
- Defined in:
- lib/stalkr/dhl.rb,
lib/stalkr/ups.rb,
lib/stalkr/base.rb,
lib/stalkr/usps.rb,
lib/stalkr/error.rb,
lib/stalkr/fedex.rb,
lib/stalkr/result.rb,
lib/stalkr/china_post.rb
Defined Under Namespace
Classes: Base, ChinaPost, DHL, Error, FEDEX, Result, UPS, USPS
Constant Summary
collapse
- UNKNOWN =
:unknown
- DELIVERED =
:delivered
- IN_TRANSIT =
:in_transit
- @@shippers =
[]
Class Method Summary
collapse
Class Method Details
.detect_shipper(text) ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/stalkr/base.rb', line 10
def self.detect_shipper(text)
Stalkr.shippers.each do |s|
id = s.(text)
return [id, s] if id
end
return nil
end
|
.shippers ⇒ Object
6
7
8
|
# File 'lib/stalkr/base.rb', line 6
def self.shippers
return @@shippers
end
|