Class: RubyXL::CellValue

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

Overview

Instance Method Summary collapse

Methods included from OOXMLObjectInstanceMethods

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

Instance Method Details

#before_write_xmlObject



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

def before_write_xml
  self.xml_space = (value.is_a?(String) && ((value =~ /\A\s/) || (value =~ /\s\Z/) || value.include?("\n"))) ? 'preserve' : nil
  true
end