Class: DeepDouble::RecursiveFunction
- Inherits:
-
Object
- Object
- DeepDouble::RecursiveFunction
- Defined in:
- lib/deep_double/recursive_function.rb
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(function) ⇒ RecursiveFunction
constructor
A new instance of RecursiveFunction.
- #to_proc ⇒ Object
Constructor Details
#initialize(function) ⇒ RecursiveFunction
Returns a new instance of RecursiveFunction.
7 8 9 |
# File 'lib/deep_double/recursive_function.rb', line 7 def initialize(function) @function = function end |
Instance Method Details
#call(*args) ⇒ Object
11 12 13 14 |
# File 'lib/deep_double/recursive_function.rb', line 11 def call(*args) result = @function.call(*args) special_case_transforms(result) end |
#to_proc ⇒ Object
16 17 18 |
# File 'lib/deep_double/recursive_function.rb', line 16 def to_proc method(:call).to_proc end |