Skip to content

Instantly share code, notes, and snippets.

@bil-bas
Last active December 12, 2015 04:58
Show Gist options
  • Save bil-bas/4718340 to your computer and use it in GitHub Desktop.
Save bil-bas/4718340 to your computer and use it in GitHub Desktop.
module Token
def self.create(user)
user.guid
end
end
class User
attr_accessor :token, :guid
def initialize(guid)
@guid = guid
@token = DeleteToken
end
end
u = User.new
token = Token.create(u)
#----------------------------------
class User
attr_accessor :token, :guid
def initialize(guid)
@guid = guid
@token = DeleteToken
end
def create_token
@token = CreateToken(guid)
end
end
u = User.new
u.create_token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment