Class: ActiveLdap::Ldif::Record
- Inherits:
-
Object
- Object
- ActiveLdap::Ldif::Record
show all
- Includes:
- GetTextSupport
- Defined in:
- lib/active_ldap/ldif.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
included
Constructor Details
#initialize(dn, attributes) ⇒ Record
632
633
634
635
|
# File 'lib/active_ldap/ldif.rb', line 632
def initialize(dn, attributes)
@dn = dn
@attributes = attributes
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
631
632
633
|
# File 'lib/active_ldap/ldif.rb', line 631
def attributes
@attributes
end
|
#dn ⇒ Object
Returns the value of attribute dn.
631
632
633
|
# File 'lib/active_ldap/ldif.rb', line 631
def dn
@dn
end
|
Instance Method Details
#==(other) ⇒ Object
647
648
649
650
651
652
|
# File 'lib/active_ldap/ldif.rb', line 647
def ==(other)
other.is_a?(self.class) and
@dn == other.dn and
Attributes.normalize(@attributes) ==
Attributes.normalize(other.attributes)
end
|
#to_hash ⇒ Object
637
638
639
|
# File 'lib/active_ldap/ldif.rb', line 637
def to_hash
attributes.merge({"dn" => dn})
end
|
#to_s ⇒ Object
641
642
643
644
645
|
# File 'lib/active_ldap/ldif.rb', line 641
def to_s
result = to_s_prelude
result << to_s_content
result
end
|