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::ITC_PROVIDER, Option::SHORTNAME, Option::SUCCESS, Option::TRANSPORT, Option::VENDOR_ID

Instance Method Summary collapse

Constructor Details

#initialize(*config) ⇒ Lookup

Returns a new instance of Lookup.



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

def initialize(*config)
  super
  options.on *SHORTNAME
  options.on *ITC_PROVIDER

  # 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



27
28
29
30
31
32
# File 'lib/itunes/store/transporter/command/lookup.rb', line 27

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