Class: Neo4j::TypeConverters::SymbolConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/neo4j/type_converters/type_converters.rb

Class Method Summary collapse

Class Method Details

.convert?(class_or_symbol) ⇒ Boolean

Returns:

  • (Boolean)


87
88
89
# File 'lib/neo4j/type_converters/type_converters.rb', line 87

def convert?(class_or_symbol)
  :symbol == class_or_symbol || Symbol == class_or_symbol
end

.index_asObject



101
102
103
# File 'lib/neo4j/type_converters/type_converters.rb', line 101

def index_as
  String
end

.to_java(value) ⇒ Object



91
92
93
94
# File 'lib/neo4j/type_converters/type_converters.rb', line 91

def to_java(value)
  return nil if value.nil?
  value.to_s
end

.to_ruby(value) ⇒ Object



96
97
98
99
# File 'lib/neo4j/type_converters/type_converters.rb', line 96

def to_ruby(value)
  return nil if value.nil?
  value.to_sym
end