module Datadog::Contrib::Patchable::ClassMethods

Class methods for integrations

Public Instance Methods

available?() click to toggle source

Is the target available? (e.g. gem installed?)

# File lib/ddtrace/contrib/patchable.rb, line 18
def available?
  !version.nil?
end
compatible?() click to toggle source

Is the loaded code compatible with this integration? (e.g. minimum version met?)

# File lib/ddtrace/contrib/patchable.rb, line 28
def compatible?
  available? && Gem::Version.new(RUBY_VERSION) >= Gem::Version.new(VERSION::MINIMUM_RUBY_VERSION)
end
loaded?() click to toggle source

Is the target loaded into the application? (e.g. constants defined?)

# File lib/ddtrace/contrib/patchable.rb, line 23
def loaded?
  true
end
patchable?() click to toggle source

Can the patch for this integration be applied?

# File lib/ddtrace/contrib/patchable.rb, line 33
def patchable?
  available? && loaded? && compatible?
end
version() click to toggle source
# File lib/ddtrace/contrib/patchable.rb, line 13
def version
  nil
end