Closed aytch closed 10 years ago
I'm having this problem with instance variables too. I don't think I'm doing anything stupid...
Using instance variables in basic handlers (as opposed to plugins) is currently not possible. Using class variables would work, unless you run two or more instances of Bot in the same Ruby process, because then they'd conflict.
In a nutshell: If you need state, use plugins.
Newbie here, but while following the example code, I found that the instance variable (@admin) declared in the configure section wasn't available to the helper functions. Changing it to a class variable allowed the example code to succeed - though I'm sure that's not the "proper" way of doing it.
Anyway, thanks for the great framework! I'm having lots of fun playing with it.