Sha256: 5c454f50c48dbb1eea86191c4d1a9dd7d0208e6201ee39dbc2726beaa3fb0819
Contents?: true
Size: 582 Bytes
Versions: 34
Compression:
Stored size: 582 Bytes
Contents
module ActiveGraph 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
34 entries across 34 versions & 1 rubygems