Module: ArelExtensions::BooleanFunctions

Instance Method Summary collapse

Instance Method Details

#and(*others) ⇒ Object



9
10
11
# File 'lib/arel_extensions/boolean_functions.rb', line 9

def and *others
  Arel::Nodes::And.new self, others
end

#or(*others) ⇒ Object



17
18
19
# File 'lib/arel_extensions/boolean_functions.rb', line 17

def or *others
  Arel::Nodes::Or.new self, others
end

#then(t, f = nil) ⇒ Object



21
22
23
# File 'lib/arel_extensions/boolean_functions.rb', line 21

def then(t, f = nil)
  ArelExtensions::Nodes::Then.new [self, t, f]
end

#(other) ⇒ Object



5
6
7
# File 'lib/arel_extensions/boolean_functions.rb', line 5

def (other)
  self.and(other)
end

#(other) ⇒ Object



13
14
15
# File 'lib/arel_extensions/boolean_functions.rb', line 13

def (other)
  self.or(other)
end