Sha256: 5a16894649bcf59eb9ec4cbddd56b10d4e9c68aa48f236f5a7e8e5441d7ed018

Contents?: true

Size: 1.87 KB

Versions: 1

Compression:

Stored size: 1.87 KB

Contents

# frozen_string_literal: true

##
# Usage example:
#
# result = ConvenientService::Examples::Rails::Gemfile.format(path: "Gemfile")
# result = ConvenientService::Examples::Rails::Gemfile.format(path: "spec/cli/gemfile/format/fixtures/Gemfile")
#
module ConvenientService
  module Examples
    module Rails
      module Gemfile
        class RailsService
          module Config
            include Support::Concern

            included do |service_class|
              service_class.class_exec do
                include Configs::Standard

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

                middlewares :initialize do
                  use Plugins::Common::AssignsAttributesInConstructor::UsingActiveModelAttributeAssignment::Middleware
                end

                ##
                # NOTE: `HasAttributes::UsingActiveModelAttributes` plugin.
                #
                concerns do
                  use Plugins::Common::HasAttributes::UsingActiveModelAttributes::Concern
                end

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
convenient_service-0.6.0 lib/convenient_service/examples/rails/gemfile/rails_service/config.rb