Sha256: 02a20ef5d56e35565429ecdc9ba92efebdbd246aadc9269bb3034f2980e1dda8

Contents?: true

Size: 806 Bytes

Versions: 4

Compression:

Stored size: 806 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
              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.16.0 lib/convenient_service/service/plugins/has_result/concern.rb
convenient_service-0.15.0 lib/convenient_service/service/plugins/has_result/concern.rb
convenient_service-0.14.0 lib/convenient_service/service/plugins/has_result/concern.rb
convenient_service-0.13.0 lib/convenient_service/service/plugins/has_result/concern.rb