Class: Jets::Application::Finisher::MonitorHook

Inherits:
Object
  • Object
show all
Defined in:
lib/jets/application/finisher.rb

Overview

:nodoc:

Instance Method Summary collapse

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

#runObject



140
141
142
# File 'lib/jets/application/finisher.rb', line 140

def run
  @monitor.enter
end