Class: CocoapodsTools::Command

Inherits:
CLAide::Command
  • Object
show all
Defined in:
lib/cocoapods-tools/command.rb

Direct Known Subclasses

Spec

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Command

Returns a new instance of Command.



22
23
24
25
26
27
# File 'lib/cocoapods-tools/command.rb', line 22

def initialize(argv)
  # @add_milk = argv.flag?('milk', true)
  # @sweetener = argv.option('sweetener')
  # puts 'cocoapods init'
  super
end

Class Method Details

.optionsObject



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

def self.options
  [
    # ['--no-milk', 'Don’t add milk to the beverage'],
    # ['--sweetener=[sugar|honey]', 'Use one of the available sweeteners'],
  ].concat(super)
end

Instance Method Details

#runObject



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/cocoapods-tools/command.rb', line 37

def run
  # puts '* cocoapods-tools…run'
  # sleep 1
  # if @add_milk
  #   puts '* Adding milk…'
  #   sleep 1
  # end
  # if @sweetener
  #   puts "* Adding #{@sweetener}…"
  #   sleep 1
  # end
end

#validate!Object



29
30
31
32
33
34
35
# File 'lib/cocoapods-tools/command.rb', line 29

def validate!
  super
  # puts 'cocoapods validate!'
  # if @sweetener && !%w(sugar honey).include?(@sweetener)
  #   help! "`#{@sweetener}' is not a valid sweetener."
  # end
end