Class: RODF::Paragraph
- Inherits:
-
ParagraphContainer
- Object
- Container
- ParagraphContainer
- RODF::Paragraph
- Defined in:
- lib/rodf/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
Returns a new instance of Paragraph.
3 4 5 6 7 8 9 10 11 |
# File 'lib/rodf/paragraph.rb', line 3 def initialize(fst = nil, snd = {}) super 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 RODF::ParagraphContainer
Instance Method Details
#xml ⇒ Object
13 14 15 16 17 |
# File 'lib/rodf/paragraph.rb', line 13 def xml Builder::XmlMarkup.new.text:p, @elem_attrs do |xml| xml << content_parts_xml end end |