Class: CocoapodsTools::Spec
- 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
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Spec
constructor
A new instance of Spec.
- #run ⇒ Object
- #validate! ⇒ Object
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
.options ⇒ Object
19 20 21 |
# File 'lib/cocoapods-tools/command/spec/spec.rb', line 19 def self. [['tag', '自动打 tag']].concat(super) end |
Instance Method Details
#run ⇒ Object
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 |