Class: ITunes::Store::Transporter::Command::Lookup

Inherits:
Mode
  • Object
show all
Defined in:
lib/itunes/store/transporter/command/lookup.rb

Overview

Retrieve the metadata for a previously delivered package.

Constant Summary

Constants included from Option

Option::APPLE_ID, Option::DESTINATION, Option::FAILURE, Option::PACKAGE, Option::SHORTNAME, Option::SUCCESS, Option::TRANSPORT, Option::VENDOR_ID

Instance Method Summary collapse

Methods inherited from Mode

#create_transporter_options

Constructor Details

#initialize(*config) ⇒ Lookup

Returns a new instance of Lookup.



15
16
17
18
19
20
21
22
# File 'lib/itunes/store/transporter/command/lookup.rb', line 15

def initialize(*config)
  super
  # These 2 are mutually exclusive, and one is required. 
  # Optout has no way to denote this
  options.on *VENDOR_ID
  options.on *APPLE_ID
  options.on *DESTINATION
end

Instance Method Details

#run(options = {}) ⇒ Object



24
25
26
27
28
29
# File 'lib/itunes/store/transporter/command/lookup.rb', line 24

def run(options = {})
  options[:destination] = Dir.mktmpdir
  super 
ensure
  FileUtils.rm_rf(options[:destination]) if options[:destination]
end