class ArticleJSON::Import::GoogleDoc::HTML::ParagraphParser

Public Class Methods

new(node:, css_analyzer:) click to toggle source

@param [Nokogiri::HTML::Node] node @param [ArticleJSON::Import::GoogleDoc::HTML::CSSAnalyzer] css_analyzer

# File lib/article_json/import/google_doc/html/paragraph_parser.rb, line 8
def initialize(node:, css_analyzer:)
  @node = node
  @css_analyzer = css_analyzer
end

Public Instance Methods

content() click to toggle source

@return [Array]

# File lib/article_json/import/google_doc/html/paragraph_parser.rb, line 14
def content
  TextParser.extract(node: @node, css_analyzer: @css_analyzer)
end
element() click to toggle source

@return [ArticleJSON::Elements::Paragraph]

# File lib/article_json/import/google_doc/html/paragraph_parser.rb, line 19
def element
  ArticleJSON::Elements::Paragraph.new(content: content)
end