Class: NewRelic::Agent::DatabaseAdapter
- Inherits:
-
Object
- Object
- NewRelic::Agent::DatabaseAdapter
- Defined in:
- lib/new_relic/agent/database_adapter.rb
Constant Summary collapse
- VERSIONS =
{ '6.1.0' => proc { ActiveRecord::Base.connection_db_config.configuration_hash[:adapter] }, '4.0.0' => proc { ActiveRecord::Base.connection_config[:adapter] }, '3.0.0' => proc { |env| ActiveRecord::Base.configurations[env]['adapter'] } }
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(env, version) ⇒ DatabaseAdapter
constructor
A new instance of DatabaseAdapter.
- #value ⇒ Object
Constructor Details
#initialize(env, version) ⇒ DatabaseAdapter
Returns a new instance of DatabaseAdapter.
22 23 24 25 |
# File 'lib/new_relic/agent/database_adapter.rb', line 22 def initialize(env, version) @env = env @version = Gem::Version.new(version) end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
20 21 22 |
# File 'lib/new_relic/agent/database_adapter.rb', line 20 def env @env end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
20 21 22 |
# File 'lib/new_relic/agent/database_adapter.rb', line 20 def version @version end |