Sha256: b97dd9922ea4fb2dd8b1f6dae4d765da780b263ba7077b9d00cf075b2a2a2132

Contents?: true

Size: 1.47 KB

Versions: 6

Compression:

Stored size: 1.47 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
            include Support::Concern

            included do |service_class|
              service_class.class_exec do
                include ConvenientService::Standard::Config

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

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
convenient_service-0.12.0 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb
convenient_service-0.11.0 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb
convenient_service-0.10.1 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb
convenient_service-0.10.0 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb
convenient_service-0.9.0 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb
convenient_service-0.8.0 lib/convenient_service/examples/dry/gemfile/dry_service/config.rb