Class: Neo4j::TypeConverters::SerializeConverter
- Inherits:
-
Object
- Object
- Neo4j::TypeConverters::SerializeConverter
- Defined in:
- lib/neo4j_helper/serialize.rb
Class Method Summary collapse
Class Method Details
.convert?(type) ⇒ Boolean
7 8 9 |
# File 'lib/neo4j_helper/serialize.rb', line 7 def convert?(type) type == :serialize end |
.to_java(value) ⇒ Object
11 12 13 14 |
# File 'lib/neo4j_helper/serialize.rb', line 11 def to_java(value) return nil unless value JSON.generate(value).to_s end |
.to_ruby(value) ⇒ Object
16 17 18 19 |
# File 'lib/neo4j_helper/serialize.rb', line 16 def to_ruby(value) return nil unless value JSON.parse(value.to_s) end |