Module: Respawn

Defined in:
lib/respawn.rb,
lib/respawn/try.rb,
lib/respawn/enum.rb,
lib/respawn/setup.rb,
lib/respawn/handler.rb,
lib/respawn/version.rb,
lib/respawn/array_try.rb,
lib/respawn/predicate.rb,
lib/respawn/environment.rb,
lib/respawn/notifier_detector.rb,
lib/respawn/exception_detector.rb

Defined Under Namespace

Modules: ArrayTry Classes: Enum, Environment, Error, ExceptionDetector, Handler, NotifierDetector, Predicate, PredicateError, Setup, Try

Constant Summary collapse

ONFAIL =
[
  :notify,
  :nothing,
  :raise,
  :handler,
].freeze
OPTIONS =
{
  notifier: NotifierDetector,
  ex: ExceptionDetector,
  onfail: :raise,
  predicate: [],
  tries: 5,
  wait: 0.5,
  env: -> { Environment.default },
  setup: nil,
}.freeze
VERSION =
"0.1.6"
ENVIRONMENTS =
%w[
  development
  production
  test
].freeze

Class Method Summary collapse

Class Method Details

.tryObject



9
10
11
# File 'lib/respawn.rb', line 9

def self.try(...)
  Try.call(...)
end