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.
39 40 41 |
# File 'lib/cyberarm_engine/ui/event.rb', line 39 def initialize(publisher, event, handler) @publisher, @event, @handler = publisher, event, handler end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
37 38 39 |
# File 'lib/cyberarm_engine/ui/event.rb', line 37 def event @event end |
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
37 38 39 |
# File 'lib/cyberarm_engine/ui/event.rb', line 37 def handler @handler end |
#publisher ⇒ Object (readonly)
Returns the value of attribute publisher.
37 38 39 |
# File 'lib/cyberarm_engine/ui/event.rb', line 37 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 |