Class: Rails::Application::Finisher::MonitorHook

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

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(monitor = Monitor.new) ⇒ MonitorHook

Returns a new instance of MonitorHook.



91
92
93
# File 'lib/rails/application/finisher.rb', line 91

def initialize(monitor = Monitor.new)
  @monitor = monitor
end

Instance Method Details

#complete(_state) ⇒ Object



99
100
101
# File 'lib/rails/application/finisher.rb', line 99

def complete(_state)
  @monitor.exit
end

#runObject



95
96
97
# File 'lib/rails/application/finisher.rb', line 95

def run
  @monitor.enter
end