Guest User

Untitled

a guest
Jun 5th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. require 'rubygems'
  2. require 'highline/import'
  3. require 'base64'
  4. class User
  5. attr_accessor :email, :password
  6.  
  7. def authentication_string
  8. Base64.encode64("#{email}:#{password}").delete("\r\n")
  9. end
  10. end
  11.  
  12.  
  13. if __FILE__ == $0
  14. user = User.new
  15.  
  16. user.email = ask("Your LightSky email address: ")
  17. user.password = ask("Your Harvest password: ") { |q| q.echo = "*" }
  18.  
  19. puts '','Your authentication string is:',user.authentication_string
  20. end
Add Comment
Please, Sign In to add comment