Class: DBF::ColumnType::Float

Inherits:
Base
  • Object
show all
Defined in:
lib/dbf/column_type.rb

Instance Attribute Summary

Attributes inherited from Base

#decimal, #encoding

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

#skip_blank?Boolean

Returns:



73
# File 'lib/dbf/column_type.rb', line 73

def skip_blank? = true

#type_cast(value) ⇒ Object

Parameters:



76
77
78
79
80
# File 'lib/dbf/column_type.rb', line 76

def type_cast(value)
  return nil if value.empty?

  value.to_f
end