Class: Caligrafo::Converter::Decimal
- Defined in:
- lib/caligrafo/converter.rb
Instance Attribute Summary
Attributes inherited from Base
#alinhamento, #preenchimento, #tipos
Instance Method Summary collapse
-
#initialize ⇒ Decimal
constructor
A new instance of Decimal.
- #value_to_string(valor) ⇒ Object
Methods inherited from Numerico
#alinhamento, #preenchimento, #string_to_value
Methods inherited from Base
Constructor Details
#initialize ⇒ Decimal
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 |