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



50
51
52
# File 'lib/active_graph/shared/type_converters.rb', line 50

def convert_type
  Float
end

.db_typeObject



54
55
56
# File 'lib/active_graph/shared/type_converters.rb', line 54

def db_type
  Float
end

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



58
59
60
# File 'lib/active_graph/shared/type_converters.rb', line 58

def to_db(value)
  value.to_f
end