Sha256: 9bc6750580c534b3f63ff4e5c6b60975b5ac269cd88a3ce8b579d30b31631a59

Contents?: true

Size: 646 Bytes

Versions: 15

Compression:

Stored size: 646 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module HasResultShortSyntax
        module Failure
          module Commands
            class RefuteKwargsContainDataAndExtraKeys < Support::Command
              attr_reader :kwargs

              def initialize(kwargs:)
                @kwargs = kwargs
              end

              def call
                return unless kwargs.has_key?(:data)

                return if kwargs.keys.one?

                raise Errors::KwargsContainDataAndExtraKeys.new
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
convenient_service-0.12.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.11.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.10.1 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.10.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.9.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.8.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.7.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.6.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.5.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.4.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.3.1 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.3.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.2.1 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.2.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb
convenient_service-0.1.0 lib/convenient_service/service/plugins/has_result_short_syntax/failure/commands/refute_kwargs_contain_data_and_extra_keys.rb