In Ruby I can add instance variables to a class by opening it, and doing something like this :
class Whatever
def add_x
@x = 20
end
end
and this would add me an instance variable by the name of x. How can I do the same thing in Groovy?