SHARE
TWEET

MEDBEDb / Ingress invite generator joke

MEDBEDb Nov 23rd, 2012 1,366 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/ruby
  2. require 'active_support/core_ext'
  3. #Here be dragons..
  4.  
  5. def more_invites?
  6.         while true
  7.         print "Need moar invitez? [y/n]: "
  8.                 case gets.strip
  9.                 when 'Y', 'y', 'yes'
  10.                 puts "How many more invites do we need captain ?"
  11.         $num2 = gets.strip.to_i
  12.         for j in 1..$num2 do
  13.                 puts("Come get your #{j.to_i.ordinalize} code " + ([*('A'..'Z'),*('0'..'9')]-%w(0 1 I O)).sample(8).join );
  14.         $num2 +=1;
  15.         end
  16.                 when /\A[nN]o?\Z/ #n or no
  17.         puts "Bye, Bai good sir"
  18.                 break
  19.                 end
  20.         end
  21. end
  22.  
  23. $invites = 0
  24. puts "How many invites do we need master ?"
  25. $num = gets.strip.to_i
  26. puts 'Serving your invitez...'
  27.  
  28. begin
  29. #until $invites > $num do
  30. for i in 1..$num do
  31. puts("Here arz ur invitez.count #{i.to_i.ordinalize} " + ([*('A'..'Z'),*('0'..'9')]-%w(0 1 I O)).sample(8).join );
  32. $invites +=1;
  33. end
  34. more_invites?
  35. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top