David A. Black wrote: > Hi -- > > On Thu, 23 Aug 2007, Finn Koch wrote: > >>> def self.check_next( input ) >> Oh, sorry, that should read 'mybot.conn.send("PRIVMSG testuser :hey", >> 0)' > > OK... (well, not OK :-) but I now know what you meant) but I'm now not > seeing what purpose the variable 'input' is serving. > >> That's what I was trying last night. > > mybot is a local variable defined in a completely different scope, > different both because method definitions have their own local scope, > and because it's in a different file, either of which would mean it > was out of scope in your method definition. > > You need to pass objects around, and make requests of those objects > (i.e., send them messages). Local variables are really just scratchpad > variables for a limited scope. > > > David Well the 'input' var isn't serving a purpose now. I'm just trying to get the callbacks and everything working and will be using input at a later time. So I could pass @conn to the check_next like so? IRCCallback.check_next(@conn, @username) And then have: class IRCCallback def check_next(server_connection, username) do stuff end end Does that look correct? -- Posted via http://www.ruby-forum.com/.