Sha256: 05693abd30ffb7237e06e914fb2753dee8d63f672a06baea5244ecd4e238102c
Contents?: true
Size: 874 Bytes
Versions: 10
Compression:
Stored size: 874 Bytes
Contents
module Datadog module Contrib # Base provides features that are shared across all integrations module Patchable def self.included(base) base.send(:extend, ClassMethods) base.send(:include, InstanceMethods) end # Class methods for integrations module ClassMethods def version nil end def present? !version.nil? end def compatible? RUBY_VERSION >= '1.9.3' && present? end end # Instance methods for integrations module InstanceMethods def patcher nil end def patch if !self.class.compatible? || patcher.nil? Datadog::Tracer.log.warn("Unable to patch #{self.class.name}") return end patcher.patch end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems