Class: Respawn::NotifierDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/respawn/notifier_detector.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(env: Environment.default) ⇒ Object

Postpone the actual setup until the first use of the method, to make sure that all the dependencies are loaded and all constants are already available. Memoize the result of first run, to avoid processing all the logic in subsequent invocations.



10
11
12
13
14
15
16
# File 'lib/respawn/notifier_detector.rb', line 10

def self.call(env: Environment.default)
  if env.test?
    new.call
  else
    @_call ||= new.call
  end
end

Instance Method Details

#callObject



18
19
20
# File 'lib/respawn/notifier_detector.rb', line 18

def call
  detect_notifier
end