Class: Datadog::Tracing::Contrib::ActiveRecord::Vendor::ConnectionAdapters::ConnectionSpecification

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/tracing/contrib/active_record/vendor/connection_specification.rb

Defined Under Namespace

Classes: ConnectionUrlResolver, Resolver

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, config, adapter_method) ⇒ ConnectionSpecification

Returns a new instance of ConnectionSpecification.



24
25
26
# File 'lib/datadog/tracing/contrib/active_record/vendor/connection_specification.rb', line 24

def initialize(name, config, adapter_method)
  @name, @config, @adapter_method = name, config, adapter_method
end

Instance Attribute Details

#adapter_methodObject (readonly)

Returns the value of attribute adapter_method.



22
23
24
# File 'lib/datadog/tracing/contrib/active_record/vendor/connection_specification.rb', line 22

def adapter_method
  @adapter_method
end

#configObject (readonly)

Returns the value of attribute config.



22
23
24
# File 'lib/datadog/tracing/contrib/active_record/vendor/connection_specification.rb', line 22

def config
  @config
end

#nameObject (readonly)

Returns the value of attribute name.



22
23
24
# File 'lib/datadog/tracing/contrib/active_record/vendor/connection_specification.rb', line 22

def name
  @name
end

Instance Method Details

#initialize_dup(original) ⇒ Object



28
29
30
# File 'lib/datadog/tracing/contrib/active_record/vendor/connection_specification.rb', line 28

def initialize_dup(original)
  @config = original.config.dup
end

#to_hashObject



32
33
34
# File 'lib/datadog/tracing/contrib/active_record/vendor/connection_specification.rb', line 32

def to_hash
  @config.merge(name: @name)
end