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.8.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.7.3 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.7.2 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.7.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.7.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.6.5 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.6.4 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.6.3 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.6.2 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.6.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.6.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.6.0.pre.beta.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.5.2 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.5.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.5.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.5.0.pre.beta.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.4.2 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.4.1 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.4.0 lib/sentry/utils/argument_checking_helper.rb
sentry-ruby-core-4.4.0.pre.beta.0 lib/sentry/utils/argument_checking_helper.rb