Class: ActiveRecord::ConnectionHandling::MergeAndResolveDefaultUrlConfig

Inherits:
Object
  • Object
show all
Defined in:
activerecord/lib/active_record/connection_handling.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(raw_configurations) ⇒ MergeAndResolveDefaultUrlConfig

Returns a new instance of MergeAndResolveDefaultUrlConfig.


65
66
67
68
# File 'activerecord/lib/active_record/connection_handling.rb', line 65

def initialize(raw_configurations)
  @raw_config = raw_configurations.dup
  @env = DEFAULT_ENV.call.to_s
end

Instance Method Details

#resolveObject

Returns fully resolved connection hashes. Merges connection information from `ENV` if available.


72
73
74
# File 'activerecord/lib/active_record/connection_handling.rb', line 72

def resolve
  ConnectionAdapters::ConnectionSpecification::Resolver.new(config).resolve_all
end