Class: WahlrechtDe::Survey
- Inherits:
-
Object
- Object
- WahlrechtDe::Survey
- Defined in:
- lib/survey.rb
Instance Attribute Summary collapse
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Instance Method Summary collapse
-
#initialize ⇒ Survey
constructor
A new instance of Survey.
- #parse(index) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Survey
Returns a new instance of Survey.
10 11 12 13 14 |
# File 'lib/survey.rb', line 10 def initialize doc = Nokogiri::HTML(open("http://www.wahlrecht.de/umfragen/index.htm")) @rows = doc.xpath("//table/tbody/tr") @datalines = [] end |
Instance Attribute Details
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
8 9 10 |
# File 'lib/survey.rb', line 8 def rows @rows end |