Class: ActiveRecord::ConnectionAdapters::ConnectionSpecification
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::ConnectionSpecification
- Defined in:
- lib/active_record/connection_adapters/connection_specification.rb
Overview
:nodoc:
Defined Under Namespace
Classes: ConnectionUrlResolver, Resolver
Instance Attribute Summary collapse
-
#adapter_method ⇒ Object
readonly
Returns the value of attribute adapter_method.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, config, adapter_method) ⇒ ConnectionSpecification
constructor
A new instance of ConnectionSpecification.
- #initialize_dup(original) ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(name, config, adapter_method) ⇒ ConnectionSpecification
Returns a new instance of ConnectionSpecification.
8 9 10 |
# File 'lib/active_record/connection_adapters/connection_specification.rb', line 8 def initialize(name, config, adapter_method) @name, @config, @adapter_method = name, config, adapter_method end |
Instance Attribute Details
#adapter_method ⇒ Object (readonly)
Returns the value of attribute adapter_method.
6 7 8 |
# File 'lib/active_record/connection_adapters/connection_specification.rb', line 6 def adapter_method @adapter_method end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
6 7 8 |
# File 'lib/active_record/connection_adapters/connection_specification.rb', line 6 def config @config end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/active_record/connection_adapters/connection_specification.rb', line 6 def name @name end |
Instance Method Details
#initialize_dup(original) ⇒ Object
12 13 14 |
# File 'lib/active_record/connection_adapters/connection_specification.rb', line 12 def initialize_dup(original) @config = original.config.dup end |
#to_hash ⇒ Object
16 17 18 |
# File 'lib/active_record/connection_adapters/connection_specification.rb', line 16 def to_hash @config.merge(name: @name) end |