Method: RubyXL::RichText#to_s

Defined in:
lib/rubyXL/objects/text.rb

#to_sObject

[View source]

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 = t.nil? ? ''.dup : t.to_s
  r&.each { |rtr| str << rtr.to_s if rtr }
  str
end