Module: ActiveLdap::Callbacks::ClassMethods

Defined in:
lib/active_ldap/callbacks.rb

Instance Method Summary collapse

Instance Method Details

#instantiate_with_callbacks(record) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/active_ldap/callbacks.rb', line 28

def instantiate_with_callbacks(record)
  object = instantiate_without_callbacks(record)

  if object.respond_to_without_attributes?(:after_find)
    object.send(:callback, :after_find)
  end

  if object.respond_to_without_attributes?(:after_initialize)
    object.send(:callback, :after_initialize)
  end

  object
end