Method: Gloo::Objs::Menu#run_command

Defined in:
lib/gloo/objs/cli/menu.rb

#run_command(cmd) ⇒ Object

Run the selected command.



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/gloo/objs/cli/menu.rb', line 185

def run_command( cmd )
  obj = find_cmd cmd

  unless obj
    if cmd == '?'
      show_options
    else
      puts "#{cmd} is not a valid option"
    end
    return
  end

  script = obj.do_script
  return unless script

  s = Gloo::Exec::Script.new script
  s.run
end