Class: Spy::Callbacks::WithArgs

Inherits:
Object
  • Object
show all
Defined in:
lib/spy/callbacks/with_args.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ WithArgs

Returns a new instance of WithArgs.



4
5
6
7
# File 'lib/spy/callbacks/with_args.rb', line 4

def initialize(*args)
  puts 'Spy::Callbacks::WithArgs is deprecated; use Spy::Callbacks::When instead'
  @match_args = args
end

Instance Method Details

#before_call(*args) ⇒ Object



9
10
11
# File 'lib/spy/callbacks/with_args.rb', line 9

def before_call(*args)
  @match_args == args
end