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.
44 45 46 47 48 |
# File 'lib/cyberarm_engine/ui/event.rb', line 44 def initialize(publisher, event, handler) @publisher = publisher @event = event @handler = handler end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
42 43 44 |
# File 'lib/cyberarm_engine/ui/event.rb', line 42 def event @event end |
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
42 43 44 |
# File 'lib/cyberarm_engine/ui/event.rb', line 42 def handler @handler end |
#publisher ⇒ Object (readonly)
Returns the value of attribute publisher.
42 43 44 |
# File 'lib/cyberarm_engine/ui/event.rb', line 42 def publisher @publisher end |
Instance Method Details
#unsubscribe ⇒ Object
50 51 52 |
# File 'lib/cyberarm_engine/ui/event.rb', line 50 def unsubscribe @publisher.unsubscribe(self) end |