Sha256: 319fda0f0fdce58ca1b50ef0a76efc989358ee88be0e9ee76f22b63802d5dcff
Contents?: true
Size: 1.2 KB
Versions: 10
Compression:
Stored size: 1.2 KB
Contents
# typed: ignore # Copyright (c) 2015 Sqreen. All Rights Reserved. # Please refer to our terms for more information: https://www.sqreen.com/terms.html 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
10 entries across 10 versions & 1 rubygems