Class: Justicecz::HtmlParser
- Inherits:
-
Object
- Object
- Justicecz::HtmlParser
- Defined in:
- lib/justicecz/html_parser.rb
Class Method Summary collapse
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.
3 4 5 6 |
# File 'lib/justicecz/html_parser.rb', line 3 def initialize(body) @body = ::Nokogiri::HTML(body) @collection = ::Justicecz::Entities::List.new end |
Class Method Details
.parse(body) ⇒ Object
8 9 10 |
# File 'lib/justicecz/html_parser.rb', line 8 def self.parse(body) new(body).parse end |
Instance Method Details
#parse ⇒ Object
12 13 14 15 |
# File 'lib/justicecz/html_parser.rb', line 12 def parse parse_response @collection end |