Class: ArticleJSON::Export::FacebookInstantArticle::Elements::TextBox
- Includes:
- Common::HTML::Elements::TextBox
- Defined in:
- lib/article_json/export/facebook_instant_article/elements/text_box.rb
Instance Method Summary collapse
-
#export ⇒ Nokogiri::XML::NodeSet
Generate a ‘<div>` node containing all text box elements and surrounded by an ASCII-art line to the top and bottom.
Methods included from Common::HTML::Elements::Shared::Float
Methods inherited from Base
Methods included from Common::HTML::Elements::Base
Instance Method Details
#export ⇒ Nokogiri::XML::NodeSet
Generate a ‘<div>` node containing all text box elements and surrounded by an ASCII-art line to the top and bottom
11 12 13 14 15 16 17 18 19 |
# File 'lib/article_json/export/facebook_instant_article/elements/text_box.rb', line 11 def export create_element(:div, class: 'text-box') do |div| div.add_child(ascii_art_line_node) @element.content.each do |child_element| div.add_child(base_class.new(child_element).export) end div.add_child(ascii_art_line_node) end end |