TracesSourceTraces

module Traces

Nested

Definitions

def self.enabled?

Signature

returns Boolean

Whether there is an active backend.

Implementation

def self.enabled?
	Backend.const_defined?(:Interface)
end

def self.Provider(klass, &block)

Extend the specified class in order to emit traces.

Implementation

def self.Provider(klass, &block)
	klass.extend(Singleton)
	provider = klass.traces_provider
	klass.prepend(provider)
	
	provider.module_exec(&block) if block_given?
	
	return provider
end