Class: WebMethods::HtmlParser
- Inherits:
-
Object
- Object
- WebMethods::HtmlParser
- Defined in:
- lib/web_methods/html_parser.rb
Instance Method Summary collapse
-
#initialize(body) ⇒ HtmlParser
constructor
A new instance of HtmlParser.
- #parse ⇒ Object
Constructor Details
#initialize(body) ⇒ HtmlParser
Returns a new instance of HtmlParser.
5 6 7 |
# File 'lib/web_methods/html_parser.rb', line 5 def initialize body @doc = Nokogiri::HTML(body) end |
Instance Method Details
#parse ⇒ Object
9 10 11 |
# File 'lib/web_methods/html_parser.rb', line 9 def parse table_to_hash @doc.css('body > table') end |