class Nfe::Helpers::XmlModel::AttributeDate
Public Instance Methods
format()
click to toggle source
# File lib/nfe/helpers/xml_model/attribute_date.rb, line 5 def format @format || "%Y-%m-%d" end
Private Instance Methods
add_element(attribute)
click to toggle source
# File lib/nfe/helpers/xml_model/attribute_date.rb, line 14 def add_element(attribute) attribute.strftime(format) end
get_value(value)
click to toggle source
# File lib/nfe/helpers/xml_model/attribute_date.rb, line 10 def get_value(value) Date.parse(value) end