Class: AndAnd::MockReturningMe
- Inherits:
-
BlankSlate
- Object
- BlankSlate
- AndAnd::MockReturningMe
- Defined in:
- lib/andand.rb
Overview
A proxy that returns its target without invoking the method you invoke. Useful for nil.andand and #dont
Instance Method Summary collapse
-
#initialize(me) ⇒ MockReturningMe
constructor
A new instance of MockReturningMe.
- #method_missing(*args) ⇒ Object
Methods inherited from BlankSlate
Constructor Details
#initialize(me) ⇒ MockReturningMe
Returns a new instance of MockReturningMe.
126 127 128 129 |
# File 'lib/andand.rb', line 126 def initialize(me) super() @me = me end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
130 131 132 |
# File 'lib/andand.rb', line 130 def method_missing(*args) @me end |