Sha256: d8f0184740476da893848744a7990d17fef8bf31e7860461541a31bb0f08858e

Contents?: true

Size: 826 Bytes

Versions: 4

Compression:

Stored size: 826 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module HasResult
        module Concern
          include Support::Concern

          class_methods do
            ##
            # @api public
            # @raise [ConvenientService::Service::Plugins::HasResult::Exceptions::ResultIsNotOverridden]
            #
            def result(...)
              new(...).result
            end
          end

          instance_methods do
            ##
            # @api public
            # @raise [ConvenientService::Service::Plugins::HasResult::Exceptions::ResultIsNotOverridden]
            #
            def result
              ::ConvenientService.raise Exceptions::ResultIsNotOverridden.new(service: self)
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/has_result/concern.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/has_result/concern.rb
convenient_service-0.18.0 lib/convenient_service/service/plugins/has_result/concern.rb
convenient_service-0.17.0 lib/convenient_service/service/plugins/has_result/concern.rb