Class: Caligrafo::Converter::Decimal

Inherits:
Numerico show all
Defined in:
lib/caligrafo/converter.rb

Instance Attribute Summary

Attributes inherited from Base

#alinhamento, #preenchimento, #tipos

Instance Method Summary collapse

Methods inherited from Numerico

#alinhamento, #preenchimento, #string_to_value

Methods inherited from Base

#preencher, #string_to_value

Constructor Details

#initializeDecimal



90
91
92
# File 'lib/caligrafo/converter.rb', line 90

def initialize
   @tipos = [Float]
end

Instance Method Details

#value_to_string(valor) ⇒ Object



94
95
96
# File 'lib/caligrafo/converter.rb', line 94

def value_to_string(valor)
   ('%.2f' % valor).gsub('.','')
end