Class: Ldap::Relations::Relation
- Inherits:
-
Object
- Object
- Ldap::Relations::Relation
- Defined in:
- lib/ldap-relations/relation.rb
Overview
This class describes an individual filter that can be combined with others to be passed to an LDAP server as part of a search.
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Relation
constructor
A new instance of Relation.
- #to_filter ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Relation
Returns a new instance of Relation.
5 6 7 |
# File 'lib/ldap-relations/relation.rb', line 5 def initialize params={} @params = params end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
9 10 11 |
# File 'lib/ldap-relations/relation.rb', line 9 def params @params end |
Instance Method Details
#to_filter ⇒ Object
11 12 13 |
# File 'lib/ldap-relations/relation.rb', line 11 def to_filter "()".insert 1, @params.map {|key, value| "#{key}=#{value}" }.join end |