Created
April 20, 2015 07:02
-
-
Save guiltry/5c416519527d8e90e9b5 to your computer and use it in GitHub Desktop.
This file contains 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 Factory::User | |
def self.make_user(user_type) | |
if user_type == "Knight" | |
@user = Knight.new | |
# Do some Knight specific operation | |
elsif user_type == "Archer" | |
@user = Archer.new | |
# Do some Archer specific operation | |
end | |
return @user | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment