Class: MethodCallCount::CallableStub

Inherits:
Object
  • Object
show all
Defined in:
lib/method_call_count/callable_stub.rb

Instance Method Summary collapse

Constructor Details

#initializeCallableStub

Returns a new instance of CallableStub.



5
6
7
# File 'lib/method_call_count/callable_stub.rb', line 5

def initialize
  @called_with = {}
end

Instance Method Details

#call(options = {}) ⇒ Object



8
9
10
# File 'lib/method_call_count/callable_stub.rb', line 8

def call(options={})
  @called_with = options
end

#called_withObject



11
12
13
# File 'lib/method_call_count/callable_stub.rb', line 11

def called_with
  @called_with.dup
end