Method: ArticleJSON::Import::GoogleDoc::HTML::QuoteParser#initialize
- Defined in:
- lib/article_json/import/google_doc/html/quote_parser.rb
#initialize(nodes:, css_analyzer:) ⇒ QuoteParser
Returns a new instance of QuoteParser.
11 12 13 14 15 16 17 18 19 |
# File 'lib/article_json/import/google_doc/html/quote_parser.rb', line 11 def initialize(nodes:, css_analyzer:) @nodes = nodes.reject { |node| NodeAnalyzer.new(node).empty? } @css_analyzer = css_analyzer # First node of the quote indicates floating behavior @float_node = @nodes.first # Last node of the quote contains the caption @caption_node = @nodes.last end |