class RubyDocx::Elements::Text
Attributes
color[R]
content[RW]
font_name[R]
font_size[R]
Public Instance Methods
content=(txt)
click to toggle source
# File lib/ruby_docx/elements/text.rb, line 14 def content=(txt) @content = txt self.element.content = txt @content end
element()
click to toggle source
# File lib/ruby_docx/elements/text.rb, line 6 def element @element ||= @node.children.first end
to_html()
click to toggle source
# File lib/ruby_docx/elements/text.rb, line 26 def to_html "#{self.content.gsub(/ /, " ")}" end
to_s()
click to toggle source
# File lib/ruby_docx/elements/text.rb, line 22 def to_s self.content.to_s end