Class: Pod::Command::Search
- Inherits:
-
Pod::Command
- Object
- Pod::Command
- Pod::Command::Search
- Defined in:
- lib/cocoapods/command/search.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Search
constructor
A new instance of Search.
- #run ⇒ Object
Methods inherited from Pod::Command
Methods included from Pod::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Search
Returns a new instance of Search.
19 20 21 22 23 24 |
# File 'lib/cocoapods/command/search.rb', line 19 def initialize(argv) @full_text_search = argv.option('--full') unless @query = argv.arguments.first super end end |
Class Method Details
.banner ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/cocoapods/command/search.rb', line 4 def self. %{Search pods: $ pod search [QUERY] Searches for pods, ignoring case, whose name matches `QUERY'. If the `--full' option is specified, this will also search in the summary and description of the pods.} end |
.options ⇒ Object
14 15 16 17 |
# File 'lib/cocoapods/command/search.rb', line 14 def self. " --full Search by name, summary, and description\n" + super end |
Instance Method Details
#run ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/cocoapods/command/search.rb', line 26 def run Source.search_by_name(@query.strip, @full_text_search).each do |set| puts "==> #{set.name} (#{set.versions.reverse.join(", ")})" puts " #{set.specification.summary.strip}" puts end end |