lib/bird/cli/thor_base.rb
# TODO: make selection return if only one option exists
#psuedo : key, value = hash.first
make selection return if only one option exists
psuedo : key, value = hash.first
make selection return if only one option exists psuedo : key value = hash . first
def select_name(choices)
      choices = choices.map.with_index{ |a, i| [i+1, *a]}
      print_table choices
      selection = ask(set_color("Pick one:",:white)).to_i
      selected = choices[selection-1][1]
      say ""
      return selected 
    end
def select_name ( choices ) choices = choices . map . with_index { | a , i | [ i + 1 , * a ] } print_table choices selection = ask ( set_color ( "Pick one:" , :white ) ) . to_i selected = choices [ selection - 1 ] [ 1 ] say "" return selected end
TODO: make selection return if only one option exists
psuedo : key, value = hash.first
TODO : make selection return if only one option exists psuedo : key value = hash . first
#result is an array
choices
<not_specific>