Class: DBF::ColumnType::Number
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#blank_value, #decode, #initialize
Constructor Details
This class inherits a constructor from DBF::ColumnType::Base
Instance Method Details
#type_cast(value) ⇒ Object
42 43 44 45 46 |
# File 'lib/dbf/column_type.rb', line 42 def type_cast(value) return nil if value.empty? decimal.zero? ? value.to_i : value.to_f end |