Skip to content

Instantly share code, notes, and snippets.

@adz
Created November 27, 2015 05:06
Show Gist options
  • Save adz/53c14d5b7edcb4755acc to your computer and use it in GitHub Desktop.
Save adz/53c14d5b7edcb4755acc to your computer and use it in GitHub Desktop.
def make_user(role, name, password)
<some code that actually makes user>
end
class UserMaker
def initialize(role)
@role = role
end
def make(name, password)
make_user(@role, name, password)
end
end
make_admin = UserMaker.new("admin")
make_admin.make("adz", "pa$$word")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment