Method: Spandx::Core::Circuit#attempt

Defined in:
lib/spandx/core/circuit.rb

#attemptObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/spandx/core/circuit.rb', line 14

def attempt
  return if open?

  open!
  result = yield
  close!
  result
ensure
  logger.debug("#{name} #{state}")
end