module Roro::Configurator::Okonomi
Public Instance Methods
ask_question(question)
click to toggle source
# File lib/roro/configurator/okonomi.rb, line 19 def ask_question(question) prompt = question[:question] default = question[:default] choices = question[:choices].keys answer = ask(prompt, default: default, limited_to: choices) answer end
ask_questions()
click to toggle source
# File lib/roro/configurator/okonomi.rb, line 12 def ask_questions choices = @structure[:choices] choices.each do |key, value| @structure[:intentions][key] = ask_question(value) end end
take_order()
click to toggle source
# File lib/roro/configurator/okonomi.rb, line 8 def take_order ask_questions end