Class: ActiveLdap::Ldif::Record
- Inherits:
-
Object
- Object
- ActiveLdap::Ldif::Record
- Includes:
- GetTextSupport
- Defined in:
- lib/active_ldap/ldif.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#dn ⇒ Object
readonly
Returns the value of attribute dn.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(dn, attributes) ⇒ Record
constructor
A new instance of Record.
- #to_hash ⇒ Object
- #to_s ⇒ Object
Methods included from GetTextSupport
Constructor Details
#initialize(dn, attributes) ⇒ Record
Returns a new instance of Record.
638 639 640 641 |
# File 'lib/active_ldap/ldif.rb', line 638 def initialize(dn, attributes) @dn = dn @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
637 638 639 |
# File 'lib/active_ldap/ldif.rb', line 637 def attributes @attributes end |
#dn ⇒ Object (readonly)
Returns the value of attribute dn.
637 638 639 |
# File 'lib/active_ldap/ldif.rb', line 637 def dn @dn end |
Instance Method Details
#==(other) ⇒ Object
653 654 655 656 657 658 |
# File 'lib/active_ldap/ldif.rb', line 653 def ==(other) other.is_a?(self.class) and @dn == other.dn and Attributes.normalize(@attributes) == Attributes.normalize(other.attributes) end |
#to_hash ⇒ Object
643 644 645 |
# File 'lib/active_ldap/ldif.rb', line 643 def to_hash attributes.merge({"dn" => dn}) end |
#to_s ⇒ Object
647 648 649 650 651 |
# File 'lib/active_ldap/ldif.rb', line 647 def to_s result = to_s_prelude result << to_s_content result end |