class RecursiveSpy
Attributes
calls[R]
Public Class Methods
new()
click to toggle source
# File lib/recursive_spy.rb, line 4 def initialize @calls = {} end
Public Instance Methods
method_missing(method, *args)
click to toggle source
# File lib/recursive_spy.rb, line 8 def method_missing(method, *args) value = self.class.new @calls[method] ||= [] @calls[method] << MethodInvocation.new( value, args ) value end