Class: Caligrafo::Converter::Data

Inherits:
Base
  • Object
show all
Defined in:
lib/caligrafo/converter.rb

Instance Attribute Summary

Attributes inherited from Base

#alinhamento, #preenchimento

Instance Method Summary collapse

Methods inherited from Base

#initialize, #preencher

Constructor Details

This class inherits a constructor from Caligrafo::Converter::Base

Instance Method Details

#string_to_value(string) ⇒ Object



68
69
70
# File 'lib/caligrafo/converter.rb', line 68

def string_to_value(string)
  Date.strptime string, '%Y%m%d'
end

#tiposObject



60
61
62
# File 'lib/caligrafo/converter.rb', line 60

def tipos
  [Date]
end

#value_to_string(valor) ⇒ Object



64
65
66
# File 'lib/caligrafo/converter.rb', line 64

def value_to_string(valor)
  valor.strftime('%Y%m%d')
end