Created
February 17, 2014 05:16
-
-
Save shunwen/9045123 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
class Foo | |
def self.do_something *args | |
new(args).do_something | |
end | |
def initialize *args | |
# set instance variables | |
@var1 = args[0] | |
# and so on | |
end | |
def do_something | |
# do something... | |
return self | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment