Class: ODF::Paragraph
- Inherits:
-
ParagraphContainer
- Object
- Container
- ParagraphContainer
- ODF::Paragraph
- Defined in:
- lib/odf/paragraph.rb
Instance Method Summary collapse
-
#initialize(fst = nil, snd = {}) ⇒ Paragraph
constructor
A new instance of Paragraph.
- #xml ⇒ Object
Methods inherited from ParagraphContainer
#<<, #content_parts, #content_parts_xml, #link, #method_missing, #span, #tab
Methods inherited from Container
Constructor Details
#initialize(fst = nil, snd = {}) ⇒ Paragraph
25 26 27 28 29 |
# File 'lib/odf/paragraph.rb', line 25 def initialize(fst = nil, snd = {}) first_is_hash = fst.instance_of? Hash span(fst) unless first_is_hash @elem_attrs = make_element_attributes(first_is_hash ? fst : snd) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ODF::ParagraphContainer
Instance Method Details
#xml ⇒ Object
31 32 33 34 35 |
# File 'lib/odf/paragraph.rb', line 31 def xml Builder::XmlMarkup.new.text:p, @elem_attrs do |xml| xml << content_parts_xml end end |