Class: XcodeArchiveCache::Command

Inherits:
CLAide::Command
  • Object
show all
Includes:
Logs
Defined in:
lib/command/inject.rb,
lib/command/command.rb

Direct Known Subclasses

Inject

Defined Under Namespace

Classes: Inject

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Logs

#debug, #error, #info, #set_log_level

Constructor Details

#initialize(argv) ⇒ Command

Returns a new instance of Command.



22
23
24
25
26
# File 'lib/command/command.rb', line 22

def initialize(argv)
  super
  log_level = argv.option("log-level", "info")
  set_log_level(log_level)
end

Class Method Details

.optionsObject



10
11
12
13
14
# File 'lib/command/command.rb', line 10

def self.options
  [
      ["--log-level=[nothing|info|verbose]", "Level of log verbosity, defaults to info"]
  ].concat(super.reject { |(name, _)| name != "--help" })
end

.run(argv) ⇒ Object



16
17
18
19
20
# File 'lib/command/command.rb', line 16

def self.run(argv)
  help! "You cannot run XcodeArchiveCache as root." if Process.uid == 0 && !Gem.win_platform?

  super(argv)
end