Sha256: 972fc2315f0ade015d539c3f180dc1331dae4f674763b01bd388c4b2ba2808c5

Contents?: true

Size: 305 Bytes

Versions: 31

Compression:

Stored size: 305 Bytes

Contents

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

31 entries across 31 versions & 2 rubygems

Version Path
sentry-ruby-core-4.3.2 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.3.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.3.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.2.2 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.2.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.2.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.1.6 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.1.5 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.1.5.pre.beta.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.1.5.pre.beta.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-4.1.4 lib/sentry/utils/argument_checking_helper.rb