Class: ADT::ColumnType::Double
Instance Method Summary collapse
Instance Method Details
#flag ⇒ Object
46 47 48 |
# File 'lib/adt/column_type.rb', line 46 def flag 'D' end |
#type_cast(value, _table) ⇒ Object
42 43 44 |
# File 'lib/adt/column_type.rb', line 42 def type_cast(value, _table) value.unpack1('D') <= 0.001 && value.unpack1('D') >= -0.001 ? 0.0 : value.unpack1('D') end |