Class: Obp::Access::RawHtmlParser
- Defined in:
- lib/obp/access/raw_html_parser.rb
Overview
Parser that converts an already-downloaded OBP HTML fragment (e.g. captured via a browser / waffle-punch) without touching the network. Duck-types with Parser for the Access pipeline.
Instance Attribute Summary
Attributes inherited from Parser
Instance Method Summary collapse
- #available_languages ⇒ Object
- #html ⇒ Object
-
#initialize(urn:, directory:, html:, caption: nil, titles: nil) ⇒ RawHtmlParser
constructor
A new instance of RawHtmlParser.
Methods inherited from Parser
Constructor Details
#initialize(urn:, directory:, html:, caption: nil, titles: nil) ⇒ RawHtmlParser
Returns a new instance of RawHtmlParser.
7 8 9 10 11 12 |
# File 'lib/obp/access/raw_html_parser.rb', line 7 def initialize(urn:, directory:, html:, caption: nil, titles: nil) super(urn:, directory:) @raw_html = html @caption = caption @raw_titles = titles end |
Instance Method Details
#available_languages ⇒ Object
18 19 20 |
# File 'lib/obp/access/raw_html_parser.rb', line 18 def available_languages [urn.language] end |
#html ⇒ Object
14 15 16 |
# File 'lib/obp/access/raw_html_parser.rb', line 14 def html @raw_html end |