Sha256: b8bcfebc3f4cef2070e3a326fa8c8eab6b403be9e03d4f865c31ac17e240a07c

Contents?: true

Size: 464 Bytes

Versions: 9

Compression:

Stored size: 464 Bytes

Contents

require "dry/container"

<% namespace do %>
  module CLI
    module Actions
      # Provides a single container of application and action specific dependencies.
      module Container
        extend Dry::Container::Mixin

        config.registry = ->(container, key, value, _options) { container[key.to_s] = value }

        merge <%= configuration.project_namespaced_class %>::Container

        register(:config) { Config.new }
      end
    end
  end
<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gemsmith-18.5.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb
gemsmith-18.4.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb
gemsmith-18.3.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb
gemsmith-18.2.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb
gemsmith-18.1.1 lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb
gemsmith-18.1.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb
gemsmith-18.0.2 lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb
gemsmith-18.0.1 lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb
gemsmith-18.0.0 lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb