Class: ActiveLdap::Schema::Entry — activeldap - ActiveLdap

Class: ActiveLdap::Schema::Entry

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/active_ldap/schema.rb

Direct Known Subclasses

Attribute, ObjectClass, Syntax

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Entry) initialize(name, schema, group)

Returns a new instance of Entry



288
289
290
291
292
293
294
295
# File 'lib/active_ldap/schema.rb', line 288

def initialize(name, schema, group)
  @schema = schema
  @name, *@aliases = attribute("NAME", name)
  @name ||= name
  @id = @schema.resolve_name(group, @name)
  collect_info
  @schema = nil
end

Instance Attribute Details

- (Object) aliases (readonly)

Returns the value of attribute aliases



287
288
289
# File 'lib/active_ldap/schema.rb', line 287

def aliases
  @aliases
end

- (Object) description (readonly)

Returns the value of attribute description



287
288
289
# File 'lib/active_ldap/schema.rb', line 287

def description
  @description
end

- (Object) id (readonly)

Returns the value of attribute id



287
288
289
# File 'lib/active_ldap/schema.rb', line 287

def id
  @id
end

- (Object) name (readonly)

Returns the value of attribute name



287
288
289
# File 'lib/active_ldap/schema.rb', line 287

def name
  @name
end

Instance Method Details

- (Object) <=>(other)



307
308
309
# File 'lib/active_ldap/schema.rb', line 307

def <=>(other)
  name <=> other.name
end

- (Boolean) eql?(other)

Returns:

  • (Boolean)


297
298
299
300
301
# File 'lib/active_ldap/schema.rb', line 297

def eql?(other)
  self.class == other.class and
    (id == other.id or
     (id.nil? and other.nil? and name == other.name))
end

- (Object) hash



303
304
305
# File 'lib/active_ldap/schema.rb', line 303

def hash
  id.nil? ? name.hash : id.hash
end

- (Object) to_param



311
312
313
# File 'lib/active_ldap/schema.rb', line 311

def to_param
  name
end