class Generator::AskLoop

Here we just implement the virtual class Utils::AskLoop

Public Class Methods

ask(args) click to toggle source
# File lib/ngi/generator.rb, line 28
def self.ask(args)
  print "\n#{args[:prompt]}"

  answer = AcceptInput.str(:downcased)

  loop do
    break if args[:check] == answer
    puts 'Exited!'
    exit
  end

  answer
end