Class: CyberarmEngine::Subscription
- Inherits:
-
Object
- Object
- CyberarmEngine::Subscription
- Defined in:
- lib/cyberarm_engine/ui/event.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
-
#publisher ⇒ Object
readonly
Returns the value of attribute publisher.
Instance Method Summary collapse
-
#initialize(publisher, event, handler) ⇒ Subscription
constructor
A new instance of Subscription.
- #unsubscribe ⇒ Object
Constructor Details
#initialize(publisher, event, handler) ⇒ Subscription
Returns a new instance of Subscription.
37 38 39 40 41 |
# File 'lib/cyberarm_engine/ui/event.rb', line 37 def initialize(publisher, event, handler) @publisher = publisher @event = event @handler = handler end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
35 36 37 |
# File 'lib/cyberarm_engine/ui/event.rb', line 35 def event @event end |
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
35 36 37 |
# File 'lib/cyberarm_engine/ui/event.rb', line 35 def handler @handler end |
#publisher ⇒ Object (readonly)
Returns the value of attribute publisher.
35 36 37 |
# File 'lib/cyberarm_engine/ui/event.rb', line 35 def publisher @publisher end |
Instance Method Details
#unsubscribe ⇒ Object
43 44 45 |
# File 'lib/cyberarm_engine/ui/event.rb', line 43 def unsubscribe @publisher.unsubscribe(self) end |