Different between instance=(value) and instance(value)?

Hello,

I was trying to create instance variable in runtime.

I want to be able to do it this way, but it’s not working, I cannot
access @page later on in my code?

def instance_name=(value)
self.instance_variable_set ‘@page’, value
end

This one works, but make my code ugly :stuck_out_tongue:

def instance_name(value)
self.instance_variable_set ‘@page’, value
end

My question is why is’t working with the second choice and not the first
one?

They are both methods, the first one is a attribute method which should
act as any other method type? or did I misunderstand something?

Thanks in advance…

//Jamal