Module: ArelExtensions::BooleanFunctions
- Included in:
- Arel::Nodes::And, Arel::Nodes::Binary, Arel::Nodes::Function, Arel::Nodes::Or, Nodes::Blank, Nodes::IsNotNull, Nodes::IsNull, Nodes::NotBlank
- Defined in:
- lib/arel_extensions/boolean_functions.rb
Instance Method Summary collapse
- #and(*others) ⇒ Object
- #or(*others) ⇒ Object
- #then(t, f = nil) ⇒ Object
- #⋀(other) ⇒ Object
- #⋁(other) ⇒ Object
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 |