Class: Jabber::Callback
- Inherits:
-
Object
- Object
- Jabber::Callback
- Defined in:
- lib/vendor/xmpp4r/lib/xmpp4r/callbacks.rb
Overview
This class is used to store callbacks inside CallbackList. See the CallbackList class for more detailed explanations.
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
The Callback’s block to execute.
-
#priority ⇒ Object
readonly
The Callback’s priority.
-
#ref ⇒ Object
readonly
The Callback’s reference, using for deleting purposes.
Instance Method Summary collapse
-
#initialize(priority = 0, ref = nil, block = Proc.new {}) ⇒ Callback
constructor
- Create a new callback priority
- Integer
-
the callback’s priority.
Constructor Details
#initialize(priority = 0, ref = nil, block = Proc.new {}) ⇒ Callback
Create a new callback
- priority
- Integer
-
the callback’s priority. The higher, the sooner it
will be executed
- ref
- String
-
The callback’s reference
118 119 120 121 122 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/callbacks.rb', line 118 def initialize(priority = 0, ref = nil, block = Proc.new {}) @priority = priority @ref = ref @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
The Callback’s block to execute
111 112 113 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/callbacks.rb', line 111 def block @block end |
#priority ⇒ Object (readonly)
The Callback’s priority
105 106 107 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/callbacks.rb', line 105 def priority @priority end |
#ref ⇒ Object (readonly)
The Callback’s reference, using for deleting purposes
108 109 110 |
# File 'lib/vendor/xmpp4r/lib/xmpp4r/callbacks.rb', line 108 def ref @ref end |