class Scoutui::Commands::Pause

Public Instance Methods

execute(e=nil) click to toggle source
# File lib/scoutui/commands/pause.rb, line 7
def execute(e=nil)
  rc=true
  h=""
  begin
    if e.is_a?(Hash)
      if e.has_key?('page')
        h=e['page']['name'].to_s
      elsif e.has_key?('name')
        h=e['name']
      end
    elsif e.is_a?(String)
      h=e
    end

    puts "====== PAUSE - HIT ENTER #{h} ========="
    STDIN.gets()
  rescue => ex
    puts "Error during processing: #{$!}"
    puts "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
    rc=false
  end
  setResult(rc)
end