Module: Neo4j::Core::Wrappable::ClassMethods

Defined in:
lib/neo4j/core/wrappable.rb

Instance Method Summary collapse

Instance Method Details

#clear_wrapper_callbackObject



21
22
23
# File 'lib/neo4j/core/wrappable.rb', line 21

def clear_wrapper_callback
  @wrapper_callback = nil
end

#wrap(node) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/neo4j/core/wrappable.rb', line 25

def wrap(node)
  if @wrapper_callback
    @wrapper_callback.call(node)
  else
    node
  end
end

#wrapper_callback(proc) ⇒ Object



16
17
18
19
# File 'lib/neo4j/core/wrappable.rb', line 16

def wrapper_callback(proc)
  fail 'Callback already specified!' if @wrapper_callback
  @wrapper_callback = proc
end