module ArticleJSON::Export::Common::HTML::Elements::Quote
Public Instance Methods
export()
click to toggle source
Generate the quote node with all its containing text elements @return [Nokogiri::XML::NodeSet]
# File lib/article_json/export/common/html/elements/quote.rb, line 12 def export create_element(quote_tag, node_opts) do |div| @element.content.each do |child_element| div.add_child(base_class.new(child_element).export) end if @element.caption&.any? div.add_child(caption_node(caption_tag)) end end end
Private Instance Methods
caption_tag()
click to toggle source
HTML
tag for the node containing the caption @return [Symbol]
# File lib/article_json/export/common/html/elements/quote.rb, line 38 def caption_tag :small end
node_opts()
click to toggle source
@return [Hash]
# File lib/article_json/export/common/html/elements/quote.rb, line 26 def node_opts { class: ['quote', floating_class].compact.join(' ') } end
quote_tag()
click to toggle source
HTML
tag for the wrapping node @return [Symbol]
# File lib/article_json/export/common/html/elements/quote.rb, line 32 def quote_tag :div end