Class: Pod::Command::Podgenerate

Inherits:
Pod::Command show all
Defined in:
lib/cocoapods-podgenerate/command.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Podgenerate

Returns a new instance of Podgenerate.



21
22
23
24
# File 'lib/cocoapods-podgenerate/command.rb', line 21

def initialize(argv)
  @debug = argv.flag?('debug', false)
  super
end

Class Method Details

.optionsObject



15
16
17
18
19
# File 'lib/cocoapods-podgenerate/command.rb', line 15

def self.options
  [
    ['--debug', 'Enable verbose profiling output and detailed timing logs']
  ].concat(super)
end

Instance Method Details

#runObject



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/cocoapods-podgenerate/command.rb', line 26

def run
  Pod::PodGenerate.activate

  if @debug
    Pod::UI.puts '[cocoapods-podgenerate] Debug mode enabled — verbose profiling output will be shown.'
    ENV['COCOAPODS_PODGENERATE_DEBUG'] = '1'
  end

  # Delegate to the standard install command
  install_command = Pod::Command::Install.new(CLAide::ARGV.new([]))
  install_command.run
end