Sha256: a2b8afb612ea5a5ecae52da4e8d8e9e9e77cef381e4be49e6fe18d46662ca96a

Contents?: true

Size: 1.44 KB

Versions: 8

Compression:

Stored size: 1.44 KB

Contents

# frozen_string_literal: true

require_relative "observable/entities"

module ConvenientService
  module Core
    module Entities
      class Config
        module Entities
          class MethodMiddlewares
            module Entities
              module MiddlewareCreators
                class Observable < MiddlewareCreators::Base
                  ##
                  # @return [Hash{Symbol => ConvenientService::Core::Entities::Config::Entities::MethodMiddlewares::Entities::MiddlewareCreators::Observable::Entities::Event}]
                  #
                  def middleware_events
                    @middleware_events ||= ::Hash.new { |hash, key| hash[key] = Entities::Event.new(type: key) }
                  end

                  ##
                  # @return [ConvenientService::Core::Entities::Config::Entities::MethodMiddlewares::Entities::Middlewares::Base]
                  #
                  def decorated_middleware
                    middleware.to_observable_middleware
                  end

                  ##
                  # @return [Hash{Symbol => Hash{Symbol => ConvenientService::Core::Entities::Config::Entities::MethodMiddlewares::Entities::MiddlewareCreators::Observable::Entities::Event}}]
                  #
                  def extra_kwargs
                    {middleware_events: middleware_events}
                  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/observable.rb
convenient_service-0.19.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable.rb
convenient_service-0.18.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable.rb
convenient_service-0.17.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable.rb
convenient_service-0.16.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable.rb
convenient_service-0.15.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable.rb
convenient_service-0.14.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable.rb
convenient_service-0.13.0 lib/convenient_service/core/entities/config/entities/method_middlewares/entities/middleware_creators/observable.rb