Class: DJI::Command::FedexCommand
- Defined in:
- lib/dji/commands/fedex/fedex_command.rb
Instance Method Summary collapse
Methods inherited from Base
command_name, inherited, namespace, perform
Instance Method Details
#fedex ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/dji/commands/fedex/fedex_command.rb', line 10 def fedex if [:repeat].present? interval = [:repeat].to_i.presence || 300 puts puts "Requesting FedEx tracking by reference #{[:reference]} every #{interval} seconds. Press CONTROL-C to stop..." while true DJI::Fedex.track_by_reference([:country_code], [:postal_code], [:reference]) sleep(interval) end else DJI::Fedex.track_by_reference([:country_code], [:postal_code], [:reference]) end end |