Module: ArelExtensions::BooleanFunctions

Instance Method Summary collapse

Instance Method Details

#and(*others) ⇒ Object



11
12
13
# File 'lib/arel_extensions/boolean_functions.rb', line 11

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

#or(*others) ⇒ Object



19
20
21
# File 'lib/arel_extensions/boolean_functions.rb', line 19

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

#then(t, f = nil) ⇒ Object



23
24
25
# File 'lib/arel_extensions/boolean_functions.rb', line 23

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

#(other) ⇒ Object



7
8
9
# File 'lib/arel_extensions/boolean_functions.rb', line 7

def (other)
  self.and(other)
end

#(other) ⇒ Object



15
16
17
# File 'lib/arel_extensions/boolean_functions.rb', line 15

def (other)
  self.or(other)
end