Class: Zypper::Onlinesearch::View::Search::Common
- Inherits:
-
Object
- Object
- Zypper::Onlinesearch::View::Search::Common
- Defined in:
- lib/zypper/onlinesearch/view.rb
Overview
Common methods for the search operation.
Class Method Summary collapse
- .no_compatible_packages ⇒ Object
- .no_packages ⇒ Object
- .parameters(args) ⇒ Object
- .separator ⇒ Object
Class Method Details
.no_compatible_packages ⇒ Object
32 33 34 35 |
# File 'lib/zypper/onlinesearch/view.rb', line 32 def self.no_compatible_packages puts "#{" " * 3} - | No compatible packages found!" separator end |
.no_packages ⇒ Object
27 28 29 30 |
# File 'lib/zypper/onlinesearch/view.rb', line 27 def self.no_packages puts "#{" " * 3} - | No packages found!" separator end |
.parameters(args) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/zypper/onlinesearch/view.rb', line 37 def self.parameters(args) engine = args[:engine].bold.red query = args[:query].bold cache = if args[:refresh] "Off".bold elsif args[:cache_time] "#{"On".bold.yellow} (#{args[:cache_time].strftime("%Y-%m-%d %H:%M")})" else "#{"On".bold.yellow} (Now)" end puts "" puts "=" * SEPARATOR_LENGTH puts "#{"Parameters:".bold} Engine: #{engine} | Query: #{query} | Cache: #{cache}" puts "=" * SEPARATOR_LENGTH end |
.separator ⇒ Object
23 24 25 |
# File 'lib/zypper/onlinesearch/view.rb', line 23 def self.separator puts "-" * SEPARATOR_LENGTH end |