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.



72
73
74
# File 'lib/caligrafo/converter.rb', line 72

def initialize
  @tipos = [Fixnum]
end

Instance Method Details

#alinhamentoObject



80
81
82
# File 'lib/caligrafo/converter.rb', line 80

def alinhamento
  :direita
end

#preenchimentoObject



84
85
86
# File 'lib/caligrafo/converter.rb', line 84

def preenchimento
  '0'
end

#string_to_value(string) ⇒ Object



76
77
78
# File 'lib/caligrafo/converter.rb', line 76

def string_to_value(string)
  string.to_i
end