Class: SpielplanSaar::ResultPageParser
- Inherits:
-
Object
- Object
- SpielplanSaar::ResultPageParser
- Defined in:
- lib/spielplan_saar/result_page_parser.rb
Instance Attribute Summary collapse
-
#html_content ⇒ Object
readonly
Returns the value of attribute html_content.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(html_content) ⇒ ResultPageParser
constructor
A new instance of ResultPageParser.
- #parse ⇒ Object
Constructor Details
#initialize(html_content) ⇒ ResultPageParser
Returns a new instance of ResultPageParser.
8 9 10 |
# File 'lib/spielplan_saar/result_page_parser.rb', line 8 def initialize(html_content) @html_content = html_content end |
Instance Attribute Details
#html_content ⇒ Object (readonly)
Returns the value of attribute html_content.
6 7 8 |
# File 'lib/spielplan_saar/result_page_parser.rb', line 6 def html_content @html_content end |
Class Method Details
.parse(html_content) ⇒ Object
12 13 14 |
# File 'lib/spielplan_saar/result_page_parser.rb', line 12 def self.parse(html_content) self.new(html_content).parse end |
Instance Method Details
#parse ⇒ Object
16 17 18 |
# File 'lib/spielplan_saar/result_page_parser.rb', line 16 def parse OpenStruct.new(:table => TableParser.new(html_content).parse) end |