Class: GemSearch::Commands::Run
- Includes:
- Rendering, Mem
- Defined in:
- lib/gem_search/commands/run.rb
Constant Summary collapse
- ENABLE_SORT_OPTS =
{ 'a' => 'downloads', 'n' => 'name', 'v' => 'version_downloads' }
Constants included from Rendering
Rendering::DEFAULT_RULED_LINE_SIZE
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Rendering
Methods inherited from Base
Constructor Details
This class inherits a constructor from GemSearch::Commands::Base
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/gem_search/commands/run.rb', line 14 def call puts_abort() unless valid?(.arguments) gems = search_gems puts_abort('We did not find results.') if gems.size.zero? gems_sort!(gems) render(gems, !['no-homepage']) rescue => e unexpected_error(e) end |