Class: TorrentSearch::Menu
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- TorrentSearch::Menu
- Defined in:
- lib/torrent_search/menu.rb
Instance Method Summary collapse
- #display ⇒ Object
-
#initialize(view, search_result) ⇒ Menu
constructor
A new instance of Menu.
Constructor Details
#initialize(view, search_result) ⇒ Menu
Returns a new instance of Menu.
10 11 12 13 14 |
# File 'lib/torrent_search/menu.rb', line 10 def initialize(view, search_result) @view = view @search_result = search_result super @view end |
Instance Method Details
#display ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/torrent_search/menu.rb', line 16 def display say_status "\n[Results]", '', :green if results? print_table result_table else say 'Nothing found' end say_status "\n[Actions]", actions, :blue choose_action! end |