Module: ArticleJSON::Export::Common::HTML::Elements::Embed
- Includes:
- Shared::Caption
- Included in:
- AMP::Elements::Embed, HTML::Elements::Embed
- Defined in:
- lib/article_json/export/common/html/elements/embed.rb
Instance Method Summary collapse
-
#export ⇒ Nokogiri::XML::NodeSet
Generate the embedded element node.
Methods included from Shared::Caption
Instance Method Details
#export ⇒ Nokogiri::XML::NodeSet
Generate the embedded element node
11 12 13 14 15 16 17 18 |
# File 'lib/article_json/export/common/html/elements/embed.rb', line 11 def export create_element(:figure) do |figure| figure.add_child() if @element.caption&.any? figure.add_child(caption_node(:figcaption)) end end end |