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
parse, report_error, run, verify_git_version!
Methods included from Pod::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Which
Returns a new instance of Which.
168 169 170 171 172 173 |
# File 'lib/cocoapods/command/spec.rb', line 168 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
162 163 164 165 166 |
# File 'lib/cocoapods/command/spec.rb', line 162 def self. [ ['--show-all', 'Print all versions of the given podspec'], ].concat(super) end |
Instance Method Details
#run ⇒ Object
180 181 182 |
# File 'lib/cocoapods/command/spec.rb', line 180 def run UI.puts get_path_of_spec(@spec, @show_all) end |
#validate! ⇒ Object
175 176 177 178 |
# File 'lib/cocoapods/command/spec.rb', line 175 def validate! super help! 'A podspec name is required.' unless @spec end |