Class: CriteriaOperator::OperandValue
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- CriteriaOperator::OperandValue
- Defined in:
- lib/criteria_operator/operand_value.rb
Overview
Operator that holds a value. This operator is an operand, thus it is always a leaf of the expression tree.
Instance Attribute Summary collapse
-
#value ⇒ Object
The stored value.
Instance Method Summary collapse
-
#clone ⇒ OperandValue
Clones an operator with all sub-operators, creating a deep copy.
-
#initialize(value) ⇒ Void
constructor
The constructor for this operand.
Methods inherited from BaseOperator
deserialize, serialize, #serialize
Constructor Details
#initialize(value) ⇒ Void
The constructor for this operand. Expects the value as parameter.
15 16 17 |
# File 'lib/criteria_operator/operand_value.rb', line 15 def initialize(value) self.value = value end |
Instance Attribute Details
#value ⇒ Object
Returns the stored value.
10 11 12 |
# File 'lib/criteria_operator/operand_value.rb', line 10 def value @value end |
Instance Method Details
#clone ⇒ OperandValue
Clones an operator with all sub-operators, creating a deep copy. Since this is an operand, there are no sub-operators to clone. Implementation of the abstract BaseOperator#clone.
23 24 25 |
# File 'lib/criteria_operator/operand_value.rb', line 23 def clone OperandValue.new self.value end |