Class: DeepDouble::RecursiveFakeMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/deep_double/recursive_fake_method.rb

Instance Method Summary collapse

Constructor Details

#initialize(fake_method) ⇒ RecursiveFakeMethod

Returns a new instance of RecursiveFakeMethod.



7
8
9
# File 'lib/deep_double/recursive_fake_method.rb', line 7

def initialize(fake_method)
  @fake_method = fake_method
end

Instance Method Details

#call(*args) ⇒ Object



11
12
13
14
# File 'lib/deep_double/recursive_fake_method.rb', line 11

def call(*args)
  result = @fake_method.call(*args)
  special_case_transforms(result)
end

#to_procObject



16
17
18
# File 'lib/deep_double/recursive_fake_method.rb', line 16

def to_proc
  method(:call).to_proc
end