class Sfp::SasTranslator::GoalVisitor

Visitor that set goal value of each variable

Public Instance Methods

set_equals(name, value) click to toggle source
# File lib/sfp/sas_translator.rb, line 1646
def set_equals(name, value)
        value = @types[@vars[name].type][0] if value.is_a?(Hash) and value.isnull
        value = @root['initial'].at?(value) if value.is_a?(String) and value.isref
        @vars[name].goal = value
end
visit(name, value, obj) click to toggle source
# File lib/sfp/sas_translator.rb, line 1652
def visit(name, value, obj)
        return if name[0,1] == '_'
        raise VariableNotFoundException, 'Variable not found: ' + name if
                not @vars.has_key?(name)
        if value.isconstraint
                self.set_equals(name, value['_value']) if value['_type'] == 'equals'
        end
        return true
end