Class: TorrentSearch::Controllers::Search
- Inherits:
-
Object
- Object
- TorrentSearch::Controllers::Search
- Defined in:
- lib/torrent_search/controllers/search.rb
Constant Summary collapse
- ACTIONS =
{ d: :download, s: :search, q: :quit }
Instance Method Summary collapse
-
#initialize(view = Views::Search.new) ⇒ Search
constructor
A new instance of Search.
- #search(search_terms = nil, options = {}) ⇒ Object
Constructor Details
Instance Method Details
#search(search_terms = nil, options = {}) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/torrent_search/controllers/search.rb', line 14 def search(search_terms = nil, = {}) search_terms ||= @view.search_terms? perform_search search_terms, choose_action! rescue SocketError error 'No network connection?' end |