Class: Torrentz::Fetch::Simple
- Inherits:
-
Object
- Object
- Torrentz::Fetch::Simple
- Includes:
- Logger
- Defined in:
- lib/torrentz/fetch.rb
Instance Method Summary collapse
- #doc ⇒ Object
-
#initialize(url) ⇒ Simple
constructor
A new instance of Simple.
Methods included from 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
#doc ⇒ Object
70 71 72 |
# File 'lib/torrentz/fetch.rb', line 70 def doc @doc ||= Nokogiri::HTML(open(Addressable::URI.encode(@url))) end |