fork(2) download
  1. @prefix = %w[all amazingly best certainly crazily deadly extra ever few great highly incredibly jolly known loftily much many never no like only pretty quirkily really rich sweet such so total terribly utterly very whole xtreme yielding zippily]
  2. @adjective = %w[appealing app apl attractive brave bold better basic common challenge c++ creative credit doge durable dare enticing entertain extreme fail fabulous few favourite giant gigantic google hello happy handy interesting in improve insane jazz joy j java known kind kiwi light laugh love lucky low more mesmerise majestic open overflow opinion opera python power point popular php practice quirk quit ruby read ready stunning stack scala task teaching talking tiny technology unexpected usual useful urban voice vibrant value word water wow where xi xanthic xylophone young yummy zebra zonk zen zoo]
  3.  
  4. def doge(input)
  5. wow = ""
  6. input.chars.each_slice(2) do |char1, char2|
  7. if char2 == nil
  8. wow << (@prefix + @adjective).sample(1)[0] + "."
  9. break
  10. end
  11. wow << @prefix.select{|e| e[0] == char1}.sample(1)[0]
  12. wow << " "
  13. wow << @adjective.select{|e| e[0] == char2}.sample(1)[0]
  14. wow << ". "
  15. end
  16. wow
  17. end
  18.  
  19. puts doge("dftba")
  20. puts doge("asofiejgie")
  21. puts doge("iglpquvi")
Success #stdin #stdout 0.02s 7476KB
stdin
Standard input is empty
stdout
deadly favourite. terribly better. challenge.
all scala. only favourite. incredibly enticing. jolly giant. incredibly extreme. 
incredibly gigantic. loftily popular. quirkily usual. very interesting.