lib/urban_pass/generate.rb in urban_pass-0.0.2.2 vs lib/urban_pass/generate.rb in urban_pass-0.0.3.1

- old
+ new

@@ -1,7 +1,8 @@ require 'open-uri' require 'nokogiri' +require 'clipboard' module UrbanPass class Generate def generate @@ -35,9 +36,18 @@ 4.times do word = random_word arr << remove_spaces(word) end pass_phrase = arr.join + copy(pass_phrase) return pass_phrase + end + + def copy(phrase) + word = Clipboard.copy(phrase) + if Clipboard.paste == phrase + puts "The password was copied correctly!!" + return word + end end end end