Class: RubyXL::Text

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

Overview

Instance Method Summary collapse

Methods inherited from OOXMLObject

#add_to_zip, define_attribute, define_child_node, define_element_name, #dup, filepath, #index_in_collection, #initialize, obtain_class_variable, parse, parse_file, set_countable, set_namespaces, #write_xml

Constructor Details

This class inherits a constructor from RubyXL::OOXMLObject

Instance Method Details

#before_write_xmlObject



12
13
14
15
# File 'lib/rubyXL/objects/text.rb', line 12

def before_write_xml
  self.xml_space = (value && (/^\s+/.match(value) || /\s+$/.match(value))) ? 'preserve' : nil
  true
end

#to_sObject



17
18
19
# File 'lib/rubyXL/objects/text.rb', line 17

def to_s
  value.to_s
end