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