Class: RubyXL::StringNodeW3C

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

Instance Attribute Summary

Attributes included from OOXMLObjectInstanceMethods

#local_namespaces

Class Method Summary collapse

Instance Method Summary collapse

Methods included from OOXMLObjectInstanceMethods

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

Class Method Details

.default(v) ⇒ Object



45
46
47
# File 'lib/rubyXL/objects/container_nodes.rb', line 45

def self.default(v)
  v && self.new(:value => v.to_datetime.iso8601)
end

Instance Method Details

#to_timeObject



41
42
43
# File 'lib/rubyXL/objects/container_nodes.rb', line 41

def to_time
  value && (value.strip.empty? ? nil : DateTime.parse(value).to_time)
end