Karel Michek wrote:
> Hi,
> 
> how to create variable in the method that accepts string as name of the variable and the object? 
> 
> Something like this:
> 
> class InterpreterCallback 
>     def set_object(name, value)
> #do something here

instance_variable_set("@#{name}", value)
>     end
> end
> 
> $callback = InterpreterCallback.new()
> $callback.set_object("var", 3)
> 
> puts var
> 
>>>> 3
> 

Alternatively you can use an OpenStruct.

Kind regards

	robert