Class: ITunes::Store::Transporter::Command::Mode
- Defined in:
- lib/itunes/store/transporter/command.rb
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
- #create_transporter_options(optz) ⇒ Object
-
#initialize(*config) ⇒ Mode
constructor
A new instance of Mode.
- #mode ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(*config) ⇒ Mode
Returns a new instance of Mode.
78 79 80 81 82 83 84 85 86 87 |
# File 'lib/itunes/store/transporter/command.rb', line 78 def initialize(*config) super .on :log, "-o", Optout::File .on :verbose, "-v", %w|informational critical detailed eXtreme| # Since log output is critical to determining what's going on we can't include "off" .on :summary, "-summaryFile", Optout::File .on :mode, "-m", /\w+/, :required => true .on :username, "-u", :required => true .on :password, "-p", :required => true .on *SHORTNAME end |
Instance Method Details
#create_transporter_options(optz) ⇒ Object
89 90 91 92 |
# File 'lib/itunes/store/transporter/command.rb', line 89 def (optz) optz[:mode] = mode super end |
#mode ⇒ Object
94 95 96 |
# File 'lib/itunes/store/transporter/command.rb', line 94 def mode self.class.to_s.split("::")[-1].gsub(/([a-z])([A-Z])/, "\1_\2").downcase end |