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

Constant Summary

Constants included from Option

Option::APPLE_ID, Option::DELETE_ON_SUCCESS, Option::DESTINATION, Option::ON_FAILURE, Option::ON_SUCCESS, Option::PACKAGE, Option::SHORTNAME, Option::TRANSPORT, Option::VENDOR_ID

Instance Method Summary (collapse)

Methods inherited from Mode

#create_transporter_options

Constructor Details

- (Lookup) initialize(*config)

A new instance of Lookup



15
16
17
18
19
20
21
22
23
# 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 *SHORTNAME
  options.on *DESTINATION
end

Instance Method Details

- (Object) run(options = {})



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

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