module BloodContracts::Instrumentation::SessionFinalizer::Basic

Basic implementation of Session finaliazer

Public Class Methods

finalize!(instruments, session) click to toggle source

Run the instruments against the session in a loop Pros:

- simplest, obvious logic

Cons:

- failure in one instrument affects the others

@param instruments [Array<Instrument>] list of Instruments to run

against the session

@param session [Session] object that hold information about matching

process, argument for Instrument#call

@return [Nothing]

# File lib/blood_contracts/instrumentation/session_finalizer/basic.rb, line 21
def self.finalize!(instruments, session)
  instruments.each { |i| i.call(session) }
end