lib/genebrand/commands/new.rb in genebrand-0.2.0 vs lib/genebrand/commands/new.rb in genebrand-0.2.1

- old
+ new

@@ -35,23 +35,28 @@ loop do choose do |menu| menu.prompt = 'What should we add?'.yellow menu.choice('String') do - brand.push(type: :word, - word: ask('Enter word (English, no spaces and punctiation, 1-10 symbols)')) do |q| - q.validate = /\A[a-zA-Z\d]{1,10}\z/ - end + str = { type: :word, word: ask('Enter word (English, no spaces and punctiation, 1-10 symbols)') { |q| q.validate = /\A[a-zA-Z\d]{1,10}\z/ } } + brand.push(str) puts end menu.choice('Specific part of speech') { brand.push(pickpart) } - if brand.length > 1 + if brand.length > 0 menu.choice('Enough, show me some brands!') { throw :parts_done } end end end + end + + choose do |menu| + menu.prompt = 'Check domain availability?'.yellow + + menu.choice('Yes') + menu.choice('No') { @gen.nowhois = true } end @gen.generate(brand) end