Class Jabber::Callback
In: lib/xmpp4r/callbacks.rb
Parent: Object

This class is used to store callbacks inside CallbackList. See the CallbackList class for more detailed explanations.

Methods

new   to_s  

Attributes

block  [R]  The Callback‘s block to execute
priority  [R]  The Callback‘s priority
ref  [R]  The Callback‘s reference, using for deleting purposes

Public Class methods

Create a new callback

priority:[Integer] the callback‘s priority. The higher, the sooner it

will be executed

ref:[String] The callback‘s reference

[Source]

     # File lib/xmpp4r/callbacks.rb, line 123
123:     def initialize(priority = 0, ref = nil, block = Proc.new {})
124:       @priority = priority
125:       @ref = ref
126:       @block = block
127:     end

Public Instance methods

[Source]

     # File lib/xmpp4r/callbacks.rb, line 129
129:     def to_s
130:       "#<#{[self.class, priority, ref].compact * " "}>"
131:     end

[Validate]