Class: ActiveRecord::Refined::AST::TruthValue
- Defined in:
- lib/active_record/refined/ast.rb
Overview
IS TRUE, IS FALSE and their negations, which every adapter spells the same way and answers alike, NULL included.
Instance Attribute Summary collapse
-
#negated ⇒ Object
readonly
Returns the value of attribute negated.
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(operand, value, negated: false) ⇒ TruthValue
constructor
A new instance of TruthValue.
- #to_arel(table, model) ⇒ Object
Methods inherited from Predicate
Methods inherited from Node
Constructor Details
#initialize(operand, value, negated: false) ⇒ TruthValue
Returns a new instance of TruthValue.
2059 2060 2061 2062 2063 |
# File 'lib/active_record/refined/ast.rb', line 2059 def initialize(operand, value, negated: false) @operand = operand @value = value @negated = negated end |
Instance Attribute Details
#negated ⇒ Object (readonly)
Returns the value of attribute negated.
2057 2058 2059 |
# File 'lib/active_record/refined/ast.rb', line 2057 def negated @negated end |
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
2057 2058 2059 |
# File 'lib/active_record/refined/ast.rb', line 2057 def operand @operand end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
2057 2058 2059 |
# File 'lib/active_record/refined/ast.rb', line 2057 def value @value end |