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