Class: Torrentz::Fetch::Simple

Inherits:
Object
  • Object
show all
Includes:
Logger
Defined in:
lib/torrentz/fetch.rb

Direct Known Subclasses

PirateBay, Vertor

Instance Method Summary collapse

Methods included from Logger

#logger, #logger=

Constructor Details

#initialize(url) ⇒ Simple

Returns a new instance of Simple.



66
67
68
# File 'lib/torrentz/fetch.rb', line 66

def initialize(url)
  @url = url
end

Instance Method Details

#docObject



70
71
72
# File 'lib/torrentz/fetch.rb', line 70

def doc
  @doc ||= Nokogiri::HTML(open(Addressable::URI.encode(@url)))
end