Class: OneCmd::Command

Inherits:
CLAide::Command
  • Object
show all
Defined in:
lib/onecmd/command.rb,
lib/onecmd/command/xcode.rb,
lib/onecmd/command/macosx.rb,
lib/onecmd/command/macosx/hiden_files.rb,
lib/onecmd/command/xcode/rm_derived_data.rb

Direct Known Subclasses

Macosx, Xcode

Defined Under Namespace

Classes: Macosx, Xcode

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Command



27
28
29
30
31
32
33
34
35
# File 'lib/onecmd/command.rb', line 27

def initialize(argv)
  super
  # config.silent = argv.flag?('silent', config.silent)
  # config.verbose = self.verbose? unless verbose.nil?
  unless self.ansi_output?
    Colored2.disable!
    String.send(:define_method, :colorize) { |string, _| string }
  end
end

Class Method Details

.optionsObject



14
15
16
17
18
# File 'lib/onecmd/command.rb', line 14

def self.options
  [
    ['--silent', 'Show nothing']
  ].concat(super)
end

.run(argv) ⇒ Object



20
21
22
23
24
25
# File 'lib/onecmd/command.rb', line 20

def self.run(argv)
  help! 'You cannot run onecmd as root.' if Process.uid == 0 && !Gem.win_platform?
  super(argv)
ensure
  # Pod::UI.print_warnings
end