class CriteriaOperator::OperandProperty

Operator that stores a property (e.g. column name). This operator is an operand, thus it is always a leaf of the expression tree.

Attributes

property_name[RW]

@return [String] the name of the property described by this operand.

Public Class Methods

new(property_name) click to toggle source

The constructor for the operand. Expects the property name as parameter. @param [String] property_name the name of the property described by this operand @return [Void]

# File lib/criteria_operator/operand_property.rb, line 15
def initialize(property_name)
  self.property_name = property_name
end

Public Instance Methods

clone() click to toggle source

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}. @return [OperandProperty] the cloned operator

# File lib/criteria_operator/operand_property.rb, line 23
def clone
  OperandProperty.new self.property_name
end