Sha256: e2ef07d3180b0147c551f9568441a1d7faa850daa4b58a6406dc89038dddab7c

Contents?: true

Size: 1.5 KB

Versions: 8

Compression:

Stored size: 1.5 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Core
    module Entities
      class Config
        module Entities
          class MethodMiddlewares
            module Entities
              module MiddlewareCreators
                class With < MiddlewareCreators::Base
                  ##
                  # @!attribute [r] middleware_arguments
                  #   @return [ConvenientService::Support::Arguments]
                  #
                  attr_reader :middleware_arguments

                  ##
                  # @param kwargs [Hash{Symbol => ConvenientService::Support::Arguments}]
                  # @return [void]
                  #
                  def initialize(**kwargs)
                    super

                    @middleware_arguments = kwargs.fetch(:middleware_arguments) { Support::Arguments.null_arguments }
                  end

                  ##
                  # @return [Hash{Symbol => ConvenientService::Support::Arguments}]
                  #
                  def extra_kwargs
                    {middleware_arguments: middleware_arguments}
                  end

                  ##
                  # @param other [Object] Can be any type.
                  # @return [Boolean, nil]
                  #
                  def ==(other)
                    super && Utils.to_bool(middleware_arguments == other.middleware_arguments)
                  end
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/with.rb
convenient_service-0.19.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/with.rb
convenient_service-0.18.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/with.rb
convenient_service-0.17.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/with.rb
convenient_service-0.16.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/with.rb
convenient_service-0.15.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/with.rb
convenient_service-0.14.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/with.rb
convenient_service-0.13.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/with.rb