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.



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

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

Instance Method Details

#complete(_state) ⇒ Object



106
107
108
# File 'lib/rails/application/finisher.rb', line 106

def complete(_state)
  @monitor.exit
end

#runObject



102
103
104
# File 'lib/rails/application/finisher.rb', line 102

def run
  @monitor.enter
end