Skip to content

Instantly share code, notes, and snippets.

View logicbeacon's full-sized avatar

Pete logicbeacon

  • Simply Binary
  • Greenville, SC
View GitHub Profile
# The idea here is that if any of the three tokens are not already
# set, then they should be generated. In order to generate one, it
# must be unique.
def generate_tokens!
[ :code, :access_token, :refresh_token ].each do |attr|
next if send(attr)
send "#{attr}=", tokenize(attr)
end
end