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.
119 120 121 122 |
# File 'lib/andand.rb', line 119 def initialize(me) super() @me = me end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
123 124 125 |
# File 'lib/andand.rb', line 123 def method_missing(*args) @me end |