class NewRelic::Agent::DatabaseAdapter
Constants
- VERSIONS
Attributes
Public Class Methods
Source
# File lib/new_relic/agent/database_adapter.rb, line 22 def initialize(env, version) @env = env @version = Gem::Version.new(version) end
Source
# File lib/new_relic/agent/database_adapter.rb, line 14 def self.value return unless defined? ActiveRecord::Base new(::NewRelic::Control.instance.env, ActiveRecord::VERSION::STRING).value end
Public Instance Methods
Source
# File lib/new_relic/agent/database_adapter.rb, line 27 def value match = VERSIONS.keys.find { |key| version >= Gem::Version.new(key) } return unless match VERSIONS[match].call(env) end