Class: ActiveLdap::Schema::Entry
- Inherits:
-
Object
- Object
- ActiveLdap::Schema::Entry
- Includes:
- Comparable
- Defined in:
- lib/active_ldap/schema.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#aliases ⇒ Object
readonly
Returns the value of attribute aliases.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(name, schema, group) ⇒ Entry
constructor
A new instance of Entry.
- #to_param ⇒ Object
Constructor Details
#initialize(name, schema, group) ⇒ Entry
Returns a new instance of Entry.
287 288 289 290 291 292 293 294 |
# File 'lib/active_ldap/schema.rb', line 287 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
#aliases ⇒ Object (readonly)
Returns the value of attribute aliases.
286 287 288 |
# File 'lib/active_ldap/schema.rb', line 286 def aliases @aliases end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
286 287 288 |
# File 'lib/active_ldap/schema.rb', line 286 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
286 287 288 |
# File 'lib/active_ldap/schema.rb', line 286 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
286 287 288 |
# File 'lib/active_ldap/schema.rb', line 286 def name @name end |
Instance Method Details
#<=>(other) ⇒ Object
306 307 308 |
# File 'lib/active_ldap/schema.rb', line 306 def <=>(other) name <=> other.name end |
#eql?(other) ⇒ Boolean
296 297 298 299 300 |
# File 'lib/active_ldap/schema.rb', line 296 def eql?(other) self.class == other.class and (id == other.id or (id.nil? and other.nil? and name == other.name)) end |
#hash ⇒ Object
302 303 304 |
# File 'lib/active_ldap/schema.rb', line 302 def hash id.nil? ? name.hash : id.hash end |
#to_param ⇒ Object
310 311 312 |
# File 'lib/active_ldap/schema.rb', line 310 def to_param name end |