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.



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

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

Instance Method Details

#complete(_state) ⇒ Object



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

def complete(_state)
  @monitor.exit
end

#runObject



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

def run
  @monitor.enter
end