Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'highline/import'
- require 'base64'
- class User
- attr_accessor :email, :password
- def authentication_string
- Base64.encode64("#{email}:#{password}").delete("\r\n")
- end
- end
- if __FILE__ == $0
- user = User.new
- user.email = ask("Your LightSky email address: ")
- user.password = ask("Your Harvest password: ") { |q| q.echo = "*" }
- puts '','Your authentication string is:',user.authentication_string
- end
Add Comment
Please, Sign In to add comment