Class: TorrentSearch::Controllers::Download

Inherits:
Object
  • Object
show all
Defined in:
lib/torrent_search/controllers/download.rb

Constant Summary collapse

DEFAULT_DIR =
'.'

Instance Method Summary collapse

Constructor Details

#initialize(search_result, view = Views::Download.new) ⇒ Download

Returns a new instance of Download.



6
7
8
9
# File 'lib/torrent_search/controllers/download.rb', line 6

def initialize(search_result, view = Views::Download.new)
  @search_result = search_result
  @view = view
end

Instance Method Details

#downloadObject



11
12
13
# File 'lib/torrent_search/controllers/download.rb', line 11

def download
  perform_download choose_torrent!, choose_path!
end