Guest User

Untitled

a guest
May 27th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. load 'codew.rb'
  2.  
  3. # Get evil idea and swap in code words
  4. print "Enter your new idea: "
  5. idea = gets
  6. @code_words.each do |real, code|
  7. idea.gsub!(real, code)
  8. end
  9.  
  10. #Save the gibberish to a new file
  11. print "File encoded. Please enter a name for this idea: "
  12. idea_name = gets.strip
  13. File::open("idea-" + idea_name + ".txt", "w") do |f|
  14. f << idea
  15. end
Add Comment
Please, Sign In to add comment