Class: SearchResults
- Inherits:
-
Object
- Object
- SearchResults
- Defined in:
- lib/subdl/subtitles_net.rb
Defined Under Namespace
Classes: SearchResultRow
Instance Method Summary collapse
-
#initialize(html) ⇒ SearchResults
constructor
A new instance of SearchResults.
- #subtitles ⇒ Object
Constructor Details
#initialize(html) ⇒ SearchResults
Returns a new instance of SearchResults.
27 28 29 |
# File 'lib/subdl/subtitles_net.rb', line 27 def initialize html @doc = Nokogiri::HTML(html) end |
Instance Method Details
#subtitles ⇒ Object
31 32 33 34 35 |
# File 'lib/subdl/subtitles_net.rb', line 31 def subtitles return @doc.css('tr.a td').map do |cell| SearchResultRow.new cell end end |