Class: ADT::ColumnType::CurDouble
Instance Method Summary collapse
Instance Method Details
#flag ⇒ Object
105 106 107 |
# File 'lib/adt/column_type.rb', line 105 def flag 'D' end |
#type_cast(value, _table) ⇒ Object
101 102 103 |
# File 'lib/adt/column_type.rb', line 101 def type_cast(value, _table) value.unpack1('D') <= 0.001 && value.unpack1('D') >= -0.001 ? nil : value.unpack('D').dig(0) end |