class TorrentSearch::Views::Download
Public Instance Methods
directory?(default)
click to toggle source
# File lib/torrent_search/views/download.rb, line 9 def directory?(default) ask "Directory to save file (default '#{default}'):" end
downloading!(torrent)
click to toggle source
# File lib/torrent_search/views/download.rb, line 13 def downloading!(torrent) say "Downloading #{torrent.name}...", :blue end
failure(error, href)
click to toggle source
# File lib/torrent_search/views/download.rb, line 21 def failure(error, href) say "Error: #{error.message} - #{href}", :red end
open?()
click to toggle source
# File lib/torrent_search/views/download.rb, line 25 def open? yes? 'Open? (y/n):' end
success()
click to toggle source
# File lib/torrent_search/views/download.rb, line 17 def success say 'Complete', :green end
torrent?(max)
click to toggle source
# File lib/torrent_search/views/download.rb, line 5 def torrent?(max) ask("Torrent (0-#{max}):") end