Class: Async::Signals::Controller::Registration
- Inherits:
-
Object
- Object
- Async::Signals::Controller::Registration
- Defined in:
- lib/async/signals/controller.rb
Overview
Represents an installed set of signal handlers.
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#close ⇒ Object
Remove this registration from the controller.
-
#initialize(controller, handlers) ⇒ Registration
constructor
Initialize the registration.
- #The context that installed this registration.=(contextthatinstalledthisregistration. = (value)) ⇒ Object
Constructor Details
#initialize(controller, handlers) ⇒ Registration
Initialize the registration.
91 92 93 94 95 |
# File 'lib/async/signals/controller.rb', line 91 def initialize(controller, handlers) @controller = controller @handlers = handlers @context = Context.current end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
98 99 100 |
# File 'lib/async/signals/controller.rb', line 98 def context @context end |
Instance Method Details
#close ⇒ Object
Remove this registration from the controller.
101 102 103 104 105 106 |
# File 'lib/async/signals/controller.rb', line 101 def close if handlers = @handlers @handlers = nil @controller.remove(self, handlers) end end |
#The context that installed this registration.=(contextthatinstalledthisregistration. = (value)) ⇒ Object
98 |
# File 'lib/async/signals/controller.rb', line 98 attr :context |