Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Corrected join_part.rb example #110

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

aytch commented Jan 11, 2013

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.

I'm having this problem with instance variables too. I don't think I'm doing anything stupid...

Owner

dominikh commented Apr 13, 2013

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.

@dominikh dominikh closed this in f646988 Mar 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment