Class: CocoapodsTools::Spec

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

Overview

This command uses an argument for the extra parameter, instead of subcommands for each of the flavor.

Direct Known Subclasses

Tag

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Spec

Returns a new instance of Spec.



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

def initialize(argv)
  @tag = argv.flag?('tag')
  super
end

Class Method Details

.optionsObject



19
20
21
# File 'lib/cocoapods-tools/command/spec/spec.rb', line 19

def self.options
  [['tag', '自动打 tag']].concat(super)
end

Instance Method Details

#runObject



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

def run
  super
  # puts "* Infuse #{@flavor} tea…"
  # sleep 1
  # if @iced
  #   puts '* Cool off…'
  #   sleep 1
  # end
end

#validate!Object



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

def validate!
  super
  # if @flavor.nil?
  #   help! 'A flavor argument is required.'
  # end
  # unless %w(black green oolong white).include?(@flavor)
  #   help! "`#{@flavor}' is not a valid flavor."
  # end
end