module ArticleJSON::Import::GoogleDoc::HTML::Shared::Caption

Public Instance Methods

caption() click to toggle source

Parse the caption node @return [Array]

# File lib/article_json/import/google_doc/html/shared/caption.rb, line 9
def caption
  return [] if no_caption?
  ArticleJSON::Import::GoogleDoc::HTML::TextParser.extract(
    node: @caption_node,
    css_analyzer: @css_analyzer
  )
end

Private Instance Methods

no_caption?() click to toggle source
# File lib/article_json/import/google_doc/html/shared/caption.rb, line 19
def no_caption?
  @caption_node.nil? ||
    @caption_node.inner_text.strip == '[no-caption]'
end