Class: ActiveGraph::Shared::TypeConverters::FloatConverter

Inherits:
BaseConverter
  • Object
show all
Defined in:
lib/active_graph/shared/type_converters.rb

Class Method Summary collapse

Methods inherited from BaseConverter

converted?, #supports_array?

Class Method Details

.convert_typeObject



56
57
58
# File 'lib/active_graph/shared/type_converters.rb', line 56

def convert_type
  Float
end

.db_typeObject



60
61
62
# File 'lib/active_graph/shared/type_converters.rb', line 60

def db_type
  Float
end

.to_db(value) ⇒ Object Also known as: to_ruby



64
65
66
# File 'lib/active_graph/shared/type_converters.rb', line 64

def to_db(value)
  value.to_f
end