Class: Mockr::CallRecorder
- Inherits:
-
Object
- Object
- Mockr::CallRecorder
- Defined in:
- lib/mockr.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(on_call) ⇒ CallRecorder
constructor
A new instance of CallRecorder.
- #method_missing(meth, *args) ⇒ Object
Constructor Details
#initialize(on_call) ⇒ CallRecorder
Returns a new instance of CallRecorder.
179 180 181 |
# File 'lib/mockr.rb', line 179 def initialize(on_call) @on_call = on_call end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
185 186 187 |
# File 'lib/mockr.rb', line 185 def method_missing(meth, *args) @on_call.call(meth, *args) end |