Class: Qpid::Proton::Event::EventType
- Inherits:
-
Object
- Object
- Qpid::Proton::Event::EventType
- Defined in:
- lib/event/event_type.rb
Overview
Manages the association between an Event and the method which should process on the context object associated with an occurance of the event.
Each type is identified by a unique #type value.
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
The method to invoke on any potential handler.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize(number, method) ⇒ EventType
constructor
A new instance of EventType.
Constructor Details
#initialize(number, method) ⇒ EventType
Returns a new instance of EventType.
51 52 53 54 55 56 57 |
# File 'lib/event/event_type.rb', line 51 def initialize(number, method) @number = number @name = Cproton.pn_event_type_name(@number) @method = method @@types ||= {} @@types[number] = self end |
Instance Attribute Details
#method ⇒ Object (readonly)
The method to invoke on any potential handler.
48 49 50 |
# File 'lib/event/event_type.rb', line 48 def method @method end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
49 50 51 |
# File 'lib/event/event_type.rb', line 49 def number @number end |