Created
October 28, 2010 18:48
-
-
Save eqdw/652046 to your computer and use it in GitHub Desktop.
In case you miss Java...
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 ProperOO | |
self.instance_variables.each do |i| | |
class_eval <<CODE | |
def get_#{i} | |
i | |
end | |
def set_#{i} newVal | |
@#{i} = newVal | |
end | |
CODE | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment