Class: RDialogy::Form
Class Method Summary collapse
-
.run(options = {}) ⇒ Object
Use up/down arrows (or control/N, control/P) to move between fields.
Class Method Details
.run(options = {}) ⇒ Object
Use up/down arrows (or control/N, control/P) to move between fields. Use tab to move between windows.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/rdialogy/form.rb', line 32 def self.run(={}) keys = [:items].map(&:label_text) super , true do |input| result = Hash.new input.split("\n").each do |item| result[keys.shift] = item end result end end |