Sha256: cfd8eae016845344ca3ac8786aa20105bb8385331b9a805d3f2d3a7e1066fed6

Contents?: true

Size: 336 Bytes

Versions: 30

Compression:

Stored size: 336 Bytes

Contents

# frozen_string_literal: true

module Sentry
  module ArgumentCheckingHelper
    private

    def check_argument_type!(argument, expected_type)
      unless argument.is_a?(expected_type)
        raise ArgumentError, "expect the argument to be a #{expected_type}, got #{argument.class} (#{argument.inspect})"
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
sentry-ruby-5.9.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.9.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.8.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-5.8.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.7.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-5.7.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.6.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-5.6.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.5.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-5.5.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-5.4.2 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.4.2 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-5.4.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.4.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.4.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.3.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.3.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.2.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.2.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-5.1.1 lib/sentry/utils/argument_checking_helper.rb