Created
February 4, 2016 20:07
-
-
Save darrencauthon/1829311f690e481e69c8 to your computer and use it in GitHub Desktop.
Simple view model in Ruby
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
class ViewModel | |
def initialize subject | |
@subject = subject | |
end | |
def method_missing meth, _, _ | |
@subject.send meth | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment