Sha256: d62fa76d40313c9f827fc833ce5d249cfa74be999d90929b71214cdfa6fe66e2
Contents?: true
Size: 1.05 KB
Versions: 9
Compression:
Stored size: 1.05 KB
Contents
require 'sqreen/ecosystem/module_api/signal_producer' module Sqreen module Ecosystem module ModuleApi module Tracing include SignalProducer def self.included(mod) mod.extend(ClassMethods) end module ClassMethods private # @param [Module] type The type the including module is interested in def consumes(type) @consumes = type end # A fixed (non-virtual) scope for this tracing module # @param [String] scope def fixed_scope(scope) @fixed_scope = scope end end def consumed_type self.class.instance_variable_get(:@consumes) \ || raise('@consumes not specified') end def scope(_hints = {}) self.class.instance_variable_get(:@fixed_scope) \ || raise('@fixed_scope not set') end # including class must implement it def receive(_data) raise NotImplementedError end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems