Method: Dry::System::Provider#initialize

Defined in:
lib/dry/system/provider.rb

#initialize(name:, namespace: nil, target_container:, source_class:, source_options: {}) ⇒ Provider

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

rubocop:disable Style/KeywordParametersOrder

API:

  • private



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/dry/system/provider.rb', line 131

def initialize(name:, namespace: nil, target_container:, source_class:, source_options: {}, &)
  @name = name
  @namespace = namespace
  @target_container = target_container

  @provider_container = build_provider_container
  @statuses = []
  @step_running = nil

  @source = source_class.new(
    **source_options,
    provider_container: provider_container,
    target_container: target_container,
    &
  )
end