Class: Ldaptic::Class

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

Overview

The anonymous class returned by the Ldaptic::Class method descends from this class.

Class Method Summary collapse

Class Method Details

.inherited(subclass) ⇒ Object

Callback which triggers the magic.



139
140
141
142
143
144
145
146
# File 'lib/ldaptic.rb', line 139

def inherited(subclass)
  if options = @options
    subclass.class_eval { include Ldaptic::Module.new(options) }
  else
    subclass.instance_variable_set(:@adapter, @adapter)
  end
  super
end