Class: Ldap::Relations::And

Inherits:
Object
  • Object
show all
Defined in:
lib/ldap-relations/and.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left, right) ⇒ And

Returns a new instance of And.



4
5
6
7
# File 'lib/ldap-relations/and.rb', line 4

def initialize left, right
  @left = left
  @right = right
end

Instance Attribute Details

#leftObject

Returns the value of attribute left.



9
10
11
# File 'lib/ldap-relations/and.rb', line 9

def left
  @left
end

#rightObject

Returns the value of attribute right.



9
10
11
# File 'lib/ldap-relations/and.rb', line 9

def right
  @right
end

Instance Method Details

#to_filterObject



11
12
13
# File 'lib/ldap-relations/and.rb', line 11

def to_filter
  "(&#{left.to_filter}#{right.to_filter})"
end