class Neo4j::Shared::TypeConverters::BigDecimalConverter
Public Class Methods
convert_type()
click to toggle source
# File lib/neo4j/shared/type_converters.rb 64 def convert_type 65 BigDecimal 66 end
db_type()
click to toggle source
# File lib/neo4j/shared/type_converters.rb 68 def db_type 69 String 70 end
to_db(value)
click to toggle source
# File lib/neo4j/shared/type_converters.rb 72 def to_db(value) 73 case value 74 when Rational 75 value.to_f.to_d 76 when respond_to?(:to_d) 77 value.to_d 78 else 79 BigDecimal(value.to_s) 80 end.to_s 81 end
to_ruby(value)
click to toggle source
# File lib/neo4j/shared/type_converters.rb 83 def to_ruby(value) 84 value.to_d 85 end