Class: ITunes::Store::Transporter::Command::Mode

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

Direct Known Subclasses

Lookup, Providers, Schema, Status, Upload, Verify

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 Base

#run

Constructor Details

- (Mode) initialize(*config)

A new instance of Mode



78
79
80
81
82
83
84
85
86
# File 'lib/itunes/store/transporter/command.rb', line 78

def initialize(*config)          
  super 
  options.on :log, "-o", Optout::File
  options.on :verbose, "-v", %w|informational critical detailed eXtreme| # Since log output is critical to determining what's going on we can't include "off" 
  options.on :username, "-u", :required => true
  options.on :password, "-p", :required => true
  options.on :summary, "-summaryFile", Optout::File
  options.on :mode, "-m", /\w+/, :required => true          
end

Instance Method Details

- (Object) create_transporter_options(optz)



88
89
90
91
# File 'lib/itunes/store/transporter/command.rb', line 88

def create_transporter_options(optz)
  optz[:mode] = mode
  super
end

- (Object) mode



93
94
95
# File 'lib/itunes/store/transporter/command.rb', line 93

def mode
  self.class.to_s.split("::")[-1].gsub(/([a-z])([A-Z])/, "\1_\2").downcase
end