Class: Torrentz::Search

Inherits:
Object
  • Object
show all
Includes:
Rack::Utils
Defined in:
lib/torrentz/search.rb

Defined Under Namespace

Classes: Result

Constant Summary collapse

URL =
"http://torrentz.eu/feed?q="

Instance Method Summary collapse

Constructor Details

#initialize(query) ⇒ Search

Returns a new instance of Search.



7
8
9
# File 'lib/torrentz/search.rb', line 7

def initialize(query)
  @url = URL + escape(query)
end

Instance Method Details

#getObject



11
12
13
# File 'lib/torrentz/search.rb', line 11

def get
  @urls ||= urls_from(@url)
end