Class: Locator::Boolean::And

Inherits:
Terms
  • Object
show all
Extended by:
Accessors
Defined in:
lib/locator/boolean.rb

Instance Method Summary collapse

Methods included from Accessors

operator, operator=

Methods inherited from Terms

#and, #and!, #or, #or!, #to_s

Constructor Details

#initialize(lft, rgt) ⇒ And

Returns a new instance of And.



36
37
38
# File 'lib/locator/boolean.rb', line 36

def initialize(lft, rgt)
  replace(Array(lft).map { |l| Array(rgt).map { |r| "#{l}#{self.class.operator}#{r}" } })
end