Created
October 17, 2018 17:48
-
-
Save macobo/9ef4fe2d42119e667cc4fb8d887bf090 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module MyExtendedMixin | |
| def setter(x) | |
| @var = x | |
| end | |
| def getter | |
| @var || super | |
| end | |
| end | |
| # On the other end | |
| class Foo | |
| extends MyExtendedMixin | |
| end | |
| # Real context: want to build a wrapper around prepend_view_path and controller_path in rails due to | |
| # using a different folder layout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment