module BloodContracts::Instrumentation
Top-level interface for BloodContracts
insturmentation
Public Instance Methods
config()
click to toggle source
Instrumentation
config
@return [Config]
# File lib/blood_contracts/instrumentation.rb, line 55 def config @config ||= Config.new end
configure() { |c| ... }
click to toggle source
Configure the instrumentation by modification of the Config
object
@yieldparam [Config]
@return [Config]
# File lib/blood_contracts/instrumentation.rb, line 18 def configure config.tap { |c| yield c } end
register_type(type)
click to toggle source
Register type in the config
@param type [BC::Refined] which added to the registry
@return [Nothing]
# File lib/blood_contracts/instrumentation.rb, line 28 def register_type(type) config.types << type type.reset_instruments! unless type.anonymous? end
reset_config!()
click to toggle source
Resets current instance of Config
@return [Nothig]
# File lib/blood_contracts/instrumentation.rb, line 63 def reset_config! @config = nil end
reset_session_finalizer!()
click to toggle source
Resets current instance of Session
finalizer
@return [#finalize!]
# File lib/blood_contracts/instrumentation.rb, line 47 def reset_session_finalizer! config.send(:reset_session_finalizer!) end
select_instruments(type_name)
click to toggle source
Select instruments for the type
@param type_name [String] used to filter the instruments
@return [Array<Instrument>]
# File lib/blood_contracts/instrumentation.rb, line 39 def select_instruments(type_name) config.send(:select_instruments, type_name) end