Class: SearchResults

Inherits:
Object
  • Object
show all
Defined in:
lib/subdl/subtitles_net.rb

Defined Under Namespace

Classes: SearchResultRow

Instance Method Summary collapse

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

#subtitlesObject



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