Class: Pod::Command::Spec::Which
- Inherits:
-
Pod::Command::Spec
- Object
- CLAide::Command
- Pod::Command
- Pod::Command::Spec
- Pod::Command::Spec::Which
- Defined in:
- lib/cocoapods/command/spec.rb
Overview
———————————————————————–#
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Which
constructor
A new instance of Which.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Pod::Command
Methods included from Pod::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Which
Returns a new instance of Which.
131 132 133 134 135 136 |
# File 'lib/cocoapods/command/spec.rb', line 131 def initialize(argv) @show_all = argv.flag?('show-all') @spec = argv.shift_argument @spec = @spec.gsub('.podspec', '') unless @spec.nil? super end |
Class Method Details
.options ⇒ Object
127 128 129 |
# File 'lib/cocoapods/command/spec.rb', line 127 def self. [["--show-all", "Print all versions of the given podspec"]].concat(super) end |
Instance Method Details
#run ⇒ Object
143 144 145 |
# File 'lib/cocoapods/command/spec.rb', line 143 def run UI.puts get_path_of_spec(@spec, @show_all) end |
#validate! ⇒ Object
138 139 140 141 |
# File 'lib/cocoapods/command/spec.rb', line 138 def validate! super help! "A podspec name is required." unless @spec end |