Page 1 of 1

Ruby init Method Cannot Access @ins

Posted: Sun Aug 18, 2013 11:41 am
by fabb
I'd like to initialize some instance variables according to the current value on one of the @ins.
@ins is nil in the init method though. Is this a bug?

Workaround: set the instance variable in the event method if it is nil.

Re: Ruby init Method Cannot Access @ins

Posted: Mon Aug 19, 2013 11:41 am
by trogluddite
Hi fabb,
Yes that's perfectly normal - and you got the right solution too.