Class: Caligrafo::Converter::Numerico

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

Direct Known Subclasses

Decimal

Instance Attribute Summary

Attributes inherited from Base

#tipos

Instance Method Summary collapse

Methods inherited from Base

#preencher, #value_to_string

Constructor Details

#initializeNumerico

Returns a new instance of Numerico.



74
75
76
# File 'lib/caligrafo/converter.rb', line 74

def initialize
  @tipos = [Fixnum]
end

Instance Method Details

#alinhamentoObject



82
83
84
# File 'lib/caligrafo/converter.rb', line 82

def alinhamento
  :direita
end

#preenchimentoObject



86
87
88
# File 'lib/caligrafo/converter.rb', line 86

def preenchimento
  '0'
end

#string_to_value(string) ⇒ Object



78
79
80
# File 'lib/caligrafo/converter.rb', line 78

def string_to_value(string)
  string.to_i
end