Class: Lookout::Recorders::Reception::Method
- Defined in:
- lib/lookout/recorders/reception.rb
Constant Summary
Constants inherited from Aphonic
Instance Method Summary collapse
- #_lookout_define(mocks) ⇒ Object
-
#initialize(recorder, negated) ⇒ Method
constructor
A new instance of Method.
- #method_missing(method, *args, &body) ⇒ Object
Methods inherited from Aphonic
Constructor Details
#initialize(recorder, negated) ⇒ Method
Returns a new instance of Method.
34 35 36 |
# File 'lib/lookout/recorders/reception.rb', line 34 def initialize(recorder, negated) @recorder, @negated = recorder, negated end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &body) ⇒ Object
38 39 40 41 |
# File 'lib/lookout/recorders/reception.rb', line 38 def method_missing(method, *args, &body) @method, @args, @body = method, args, body @recorder end |
Instance Method Details
#_lookout_define(mocks) ⇒ Object
43 44 45 |
# File 'lib/lookout/recorders/reception.rb', line 43 def _lookout_define(mocks) mocks.define(@recorder.subject, @method, *@args, &@body).tap{ |m| m.never if @negated } end |