Class: DeepDouble::RecursiveFakeMethod
- Inherits:
-
Object
- Object
- DeepDouble::RecursiveFakeMethod
- Defined in:
- lib/deep_double/recursive_fake_method.rb
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(fake_method) ⇒ RecursiveFakeMethod
constructor
A new instance of RecursiveFakeMethod.
- #to_proc ⇒ Object
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_proc ⇒ Object
16 17 18 |
# File 'lib/deep_double/recursive_fake_method.rb', line 16 def to_proc method(:call).to_proc end |