Class: CriteriaOperator::OperandProperty
- Inherits:
-
BaseOperator
- Object
- BaseOperator
- CriteriaOperator::OperandProperty
- Defined in:
- lib/criteria_operator/operand_property.rb
Overview
Operator that stores a property (e.g. column name). This operator is an operand, thus it is always a leaf of the expression tree.
Instance Attribute Summary collapse
-
#property_name ⇒ String
The name of the property described by this operand.
Instance Method Summary collapse
-
#clone ⇒ OperandProperty
Clones an operator with all sub-operators, creating a deep copy.
-
#initialize(property_name) ⇒ Void
constructor
The constructor for the operand.
Methods inherited from BaseOperator
deserialize, serialize, #serialize
Constructor Details
#initialize(property_name) ⇒ Void
The constructor for the operand. Expects the property name as parameter.
15 16 17 |
# File 'lib/criteria_operator/operand_property.rb', line 15 def initialize(property_name) self.property_name = property_name end |
Instance Attribute Details
#property_name ⇒ String
Returns the name of the property described by this operand.
10 11 12 |
# File 'lib/criteria_operator/operand_property.rb', line 10 def property_name @property_name end |
Instance Method Details
#clone ⇒ OperandProperty
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_property.rb', line 23 def clone OperandProperty.new self.property_name end |