Sha256: ded45990132bf69814e85278e4e8da1187f0c31e95024495f5f3f9e9662cf13a
Contents?: true
Size: 576 Bytes
Versions: 11
Compression:
Stored size: 576 Bytes
Contents
module Neo4j module Core module Wrappable extend ActiveSupport::Concern def wrap self.class.wrap(self) end class_methods do def wrapper_callback(proc) fail 'Callback already specified!' if @wrapper_callback @wrapper_callback = proc end def clear_wrapper_callback @wrapper_callback = nil end def wrap(node) if @wrapper_callback @wrapper_callback.call(node) else node end end end end end end
Version data entries
11 entries across 11 versions & 2 rubygems