Class: Isaac::Queue
- Inherits:
-
Object
- Object
- Isaac::Queue
- Defined in:
- lib/isaac/bot.rb
Instance Method Summary collapse
- #<<(message) ⇒ Object
-
#initialize(socket, server) ⇒ Queue
constructor
A new instance of Queue.
- #lock ⇒ Object
- #unlock ⇒ Object
Constructor Details
#initialize(socket, server) ⇒ Queue
Returns a new instance of Queue.
284 285 286 287 288 |
# File 'lib/isaac/bot.rb', line 284 def initialize(socket, server) # We need server for pinging us out of an excess flood @socket, @server = socket, server @queue, @lock, @transfered = [], false, 0 end |
Instance Method Details
#<<(message) ⇒ Object
299 300 301 302 |
# File 'lib/isaac/bot.rb', line 299 def <<() @queue << invoke end |
#lock ⇒ Object
290 291 292 |
# File 'lib/isaac/bot.rb', line 290 def lock @lock = true end |
#unlock ⇒ Object
294 295 296 297 |
# File 'lib/isaac/bot.rb', line 294 def unlock @lock, @transfered = false, 0 invoke end |