class StubRequests::InvalidArgumentType

InvalidArgumentType is raised when an argument is not of the expected type

Public Class Methods

new(name:, actual:, expected:) click to toggle source

@param [Symbol] name the name of the argument @param [Object] actual the actual value of the argument @param [Array<Class>, Array<Module>] expected the types the argument is expected to be

Calls superclass method
# File lib/stub_requests/exceptions.rb, line 61
def initialize(name:, actual:, expected:)
  super("The argument `:#{name}` was `#{actual}`, expected any of [#{expected.join(', ')}]")
end