Sha256: 4edac3ed8c8928a861af8cf69c6883189f413b0fe31234d66d5412d81f26cc08
Contents?: true
Size: 906 Bytes
Versions: 10
Compression:
Stored size: 906 Bytes
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/loggable' module Sqreen module Ecosystem # The API that the transport/tracing modules are written against module ModuleApi TRACE_ID_HEADER = 'X-Sqreen-Trace-Identifier'.freeze TRACE_ID_ENV_KEY = 'HTTP_X_SQREEN_TRACE_IDENTIFIER'.freeze Loggable = Sqreen::Ecosystem::Loggable module ClassMethods attr_writer :module_name def module_name if instance_variable_defined?(:@module_name) @module_name else # to snake case @module_name = to_s.sub(/.*::/, '').gsub(/([a-z])([A-Z])/, '\1_\2').downcase end end end def self.included(mod) mod.extend(ClassMethods) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems