Included Modules

Class/Module Index [+]

Quicksearch

Rudy::Routines::Handlers::Base

Public Instance Methods

keep_going?() click to toggle source
# File lib/rudy/routines/handlers/base.rb, line 31
def keep_going?
  Annoy.pose_question("  Keep going?\a ", /yes|y|ya|sure|you bet!/, STDERR)
end
trap_rbox_errors(ret=nil, &command) click to toggle source
# File lib/rudy/routines/handlers/base.rb, line 7
def trap_rbox_errors(ret=nil, &command)
  begin
    ret = command.call if command
    return unless ret.is_a?(Rye::Rap)
    li '  ' << ret.stdout.join("#{$/}  ") if !ret.stdout.empty?
    print_response(ret)
  rescue IOError => ex
    le "  Connection Error (#{ex.message})".color(:red)
    choice = Annoy.get_user_input('(S)kip  (R)etry  (F)orce  (A)bort: ', nil, 3600) || ''
     if choice.match(/\AS/)
       return
     elsif choice.match(/\AR/)
       retry
     elsif choice.match(/\AF/)
       @@global.force = true
       retry
     else
       exit 12
     end
  end
  
  ret
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.