Class: Chromedriver::Helper::GoogleCodeParser
- Inherits:
-
Object
- Object
- Chromedriver::Helper::GoogleCodeParser
- Defined in:
- lib/chromedriver/helper/google_code_parser.rb
Instance Attribute Summary collapse
-
#html ⇒ Object
readonly
Returns the value of attribute html.
Instance Method Summary collapse
- #downloads ⇒ Object
-
#initialize(html) ⇒ GoogleCodeParser
constructor
A new instance of GoogleCodeParser.
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
#html ⇒ Object (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
#downloads ⇒ Object
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 |