Class: Jets::Application::Finisher::MonitorHook
- Inherits:
-
Object
- Object
- Jets::Application::Finisher::MonitorHook
- Defined in:
- lib/jets/application/finisher.rb
Overview
:nodoc:
Instance Method Summary collapse
- #complete(_state) ⇒ Object
-
#initialize(monitor = Monitor.new) ⇒ MonitorHook
constructor
A new instance of MonitorHook.
- #run ⇒ Object
Constructor Details
#initialize(monitor = Monitor.new) ⇒ MonitorHook
Returns a new instance of MonitorHook.
136 137 138 |
# File 'lib/jets/application/finisher.rb', line 136 def initialize(monitor = Monitor.new) @monitor = monitor end |
Instance Method Details
#complete(_state) ⇒ Object
144 145 146 |
# File 'lib/jets/application/finisher.rb', line 144 def complete(_state) @monitor.exit end |
#run ⇒ Object
140 141 142 |
# File 'lib/jets/application/finisher.rb', line 140 def run @monitor.enter end |