Sha256: 7ad3ce9fe817b7def4caa75337b47331a9f4d2b91d3bc193306ab74eaefdf3be

Contents?: true

Size: 1.35 KB

Versions: 5

Compression:

Stored size: 1.35 KB

Contents

# frozen_string_literal: true

##
# Usage example:
#
# result = ConvenientService::Examples::Dry::Gemfile.format(path: "Gemfile")
# result = ConvenientService::Examples::Dry::Gemfile.format(path: "spec/cli/gemfile/format/fixtures/Gemfile")
#
module ConvenientService
  module Examples
    module Dry
      module Gemfile
        class DryService
          module Config
            def self.included(service_class)
              service_class.class_exec do
                include Configs::Standard

                ##
                # NOTE: `AssignsAttributesInConstructor::UsingDryInitializer` plugin.
                #
                concerns do
                  use Plugins::Common::AssignsAttributesInConstructor::UsingDryInitializer::Concern
                end

                ##
                # NOTE: `HasResultParamsValidations::UsingDryValidation` plugin.
                #
                concerns do
                  use Plugins::Service::HasResultParamsValidations::UsingDryValidation::Concern
                end

                middlewares :result do
                  insert_before \
                    Plugins::Service::HasResultSteps::Middleware,
                    Plugins::Service::HasResultParamsValidations::UsingDryValidation::Middleware
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
convenient_service-0.5.0 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb
convenient_service-0.4.0 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb
convenient_service-0.3.1 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb
convenient_service-0.3.0 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb
convenient_service-0.2.1 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb