Skip to content

Instantly share code, notes, and snippets.

@adrianmoses
Created February 4, 2013 20:59
Show Gist options
  • Save adrianmoses/4709677 to your computer and use it in GitHub Desktop.
Save adrianmoses/4709677 to your computer and use it in GitHub Desktop.
module Tackit
class User
def initialize(user, pass)
@user = user
@pass = pass
@token = Token.new.find_token(@user, @pass)
end
def has_token?
@token
end
def get_auth_token
@token = Gist.authorize(@user, @pass)
Token.new.save_token(@user, @pass, @token)
@token
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment