Class: RubyXL::RichText

Inherits:
OOXMLObject show all
Defined in:
lib/rubyXL/objects/text.rb

Overview

Instance Attribute Summary

Attributes included from OOXMLObjectInstanceMethods

#local_namespaces

Instance Method Summary collapse

Methods included from OOXMLObjectInstanceMethods

#==, #before_write_xml, included, #index_in_collection, #initialize, #write_xml

Instance Method Details

#to_sObject



85
86
87
88
89
90
# File 'lib/rubyXL/objects/text.rb', line 85

def to_s
  # `dup` here unfreezes the string since it's not a constant but initial value
  str = if t.nil? then ''.dup else t.to_s end
  r && r.each { |rtr| str << rtr.to_s if rtr }
  str
end