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 190 190: def eval(expr) 191: query = expr.query 192: query.scenarioIdx = @scenarioIdx 193: query.attributeId = @operand1 194: query.process 195: # The logical expressions are mostly about comparing values. So we use 196: # the sortableResult of the Query. This creates some challenges for load 197: # values, as the user is not accustomed to the internal representation 198: # of those. 199: # Convert nil results into empty Strings if necessary 200: query.result || '' 201: end
Dumps the LogicalOperation as String. If query is nil, the variable names are shown, otherwise their values.
# File lib/LogicalOperation.rb, line 205 205: def to_s(query) 206: if query 207: query.process 208: query.to_s 209: else 210: "#{@scenarioIdx}.#{@operand1}" 211: end 212: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.