Class: BerkeleyLibrary::Util::ODS::XML::Text::P

Inherits:
ElementNode
  • Object
show all
Defined in:
lib/berkeley_library/util/ods/xml/text/p.rb

Constant Summary collapse

ESCAPABLE =

Constant

["\t", "\n", ' '].freeze

Instance Attribute Summary collapse

Attributes inherited from ElementNode

#doc, #element_name, #namespace

Instance Method Summary collapse

Methods inherited from ElementNode

#add_child, #attributes, #children, #clear_attribute, #create_element, #element, #ensure_element!, #prefix, #prefixed_attr_name, #set_attribute

Constructor Details

#initialize(text, doc:) ⇒ P


Initializer



23
24
25
26
27
28
# File 'lib/berkeley_library/util/ods/xml/text/p.rb', line 23

def initialize(text, doc:)
  super(:text, 'p', doc: doc)

  @text = text
  add_default_children!
end

Instance Attribute Details

#textObject (readonly)


Accessors



18
19
20
# File 'lib/berkeley_library/util/ods/xml/text/p.rb', line 18

def text
  @text
end