Exception: ActiveLdap::LdapError

Inherits:
Error
  • Object
show all
Defined in:
lib/active_ldap/ldap_error.rb

Constant Summary collapse

ERRORS =
{}

Class Method Summary collapse

Methods included from GetTextSupport

included

Class Method Details

.define(code, name, target) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/active_ldap/ldap_error.rb', line 4

def define(code, name, target)
  klass_name = name.downcase.camelize
  target.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
    class #{klass_name} < #{self}
      CODE = #{code}
      def code
        CODE
      end
    end
EOC
  target.const_get(klass_name)
end