Class: Chromedriver::Helper::GoogleCodeParser

Inherits:
Object
  • Object
show all
Defined in:
lib/chromedriver/helper/google_code_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ GoogleCodeParser

Returns a new instance of GoogleCodeParser.



8
9
10
# File 'lib/chromedriver/helper/google_code_parser.rb', line 8

def initialize html
  @html = html
end

Instance Attribute Details

#htmlObject (readonly)

Returns the value of attribute html.



6
7
8
# File 'lib/chromedriver/helper/google_code_parser.rb', line 6

def html
  @html
end

Instance Method Details

#downloadsObject



12
13
14
15
# File 'lib/chromedriver/helper/google_code_parser.rb', line 12

def downloads
  doc = Nokogiri::HTML html
  doc.css("td.vt a[@title=Download]").collect {|_| _["href"]}
end