(self, variable_definition)
return current
Get variable value in current context

        Args:
            variable_definition (:class:`business_logic.models.VariableDefinition`): definition of variable

        Returns:
            variable value
Get variable value in current context
Get variable value in current context
def get_variable(self, variable_definition):
        """
        Get variable value in current context

        Args:
            variable_definition (:class:`business_logic.models.VariableDefinition`): definition of variable

        Returns:
            variable value

        """
        assert isinstance(variable_definition, VariableDefinition)

        try:
            return self._vars[variable_definition.name]
        except KeyError:
            pass

        if variable_definition.name.find('.') == -1:
            return Variable.Undefined()

        attrs = variable_definition.name.split('.')

        try:
            current = self._vars[attrs[0]]
        except KeyError:
            return Variable.Undefined()

        for attr in attrs[1:]:
            try:
                current = getattr(current, attr)
            except AttributeError:
                return Variable.Undefined()

        return current
def get_variable ( self , variable_definition ) : assert isinstance ( variable_definition , VariableDefinition ) try : return self . _vars [ variable_definition . name ] except KeyError : pass if variable_definition . name . find ( '.' ) == - 1 : return Variable . Undefined ( ) attrs = variable_definition . name . split ( '.' ) try : current = self . _vars [ attrs [ 0 ] ] except KeyError : return Variable . Undefined ( ) for attr in attrs [ 1 : ] : try : current = getattr ( current , attr ) except AttributeError : return Variable . Undefined ( ) return current