This class handles operands that are property attributes. They are addressed by attribute ID and scenario index. The expression provides the property reference.
To evaluate a property attribute we use the Query mechanism to retrieve the value.
# File lib/LogicalOperation.rb, line 186 186: def eval(expr) 187: query = expr.query 188: query.scenarioIdx = @scenarioIdx 189: query.attributeId = @operand1 190: query.process 191: # The logical expressions are mostly about comparing values. So we use 192: # the sortableResult of the Query. This creates some challenges for load 193: # values, as the user is not accustomed to the internal representation 194: # of those. 195: # Convert nil results into empty Strings if necessary 196: query.result || '' 197: end
Dumps the LogicalOperation as String. If query is nil, the variable names are shown, otherwise their values.
# File lib/LogicalOperation.rb, line 201 201: def to_s(query) 202: if query 203: query.process 204: query.to_s 205: else 206: "#{@scenarioIdx}.#{@operand1}" 207: end 208: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.