module ArticleJSON::Export::Common::HTML::Elements::Shared::Caption

Public Instance Methods

caption_node(tag_name) click to toggle source

Generate the caption node @param [String] tag_name @return [Nokogiri::XML::NodeSet]

# File lib/article_json/export/common/html/elements/shared/caption.rb, line 11
def caption_node(tag_name)
  create_element(tag_name) do |caption|
    @element.caption.each do |child_element|
      caption.add_child(text_exporter.new(child_element).export)
    end
  end
end

Private Instance Methods

text_exporter() click to toggle source

Get the exporter class for text elements @return [ArticleJSON::Export::Common::HTML::Elements::Base]

# File lib/article_json/export/common/html/elements/shared/caption.rb, line 23
def text_exporter
  self.class.exporter_by_type(:text)
end