class ActiveGraph::Shared::TypeConverters::IntegerConverter
Constants
- NEO4J_LARGEST_INT
- NEO4J_SMALLEST_INT
Public Class Methods
convert_type()
click to toggle source
# File lib/active_graph/shared/type_converters.rb 35 def convert_type 36 Integer 37 end
converted?(value)
click to toggle source
# File lib/active_graph/shared/type_converters.rb 31 def converted?(value) 32 false 33 end
db_type()
click to toggle source
# File lib/active_graph/shared/type_converters.rb 39 def db_type 40 Integer 41 end
to_db(value)
click to toggle source
# File lib/active_graph/shared/type_converters.rb 43 def to_db(value) 44 val = value.to_i 45 val > NEO4J_LARGEST_INT || val < NEO4J_SMALLEST_INT ? val.to_s : val 46 end
to_ruby(value)
click to toggle source
# File lib/active_graph/shared/type_converters.rb 48 def to_ruby(value) 49 value.to_i 50 end