Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. Pry.commands.alias_command 'wh', 'whereami'
  2.  
  3. if defined?(PryNav)
  4. Pry.commands.alias_command 'c', 'continue'
  5. Pry.commands.alias_command 's', 'step'
  6. Pry.commands.alias_command 'n', 'next'
  7. end
  8.  
  9. if defined?(PryByebug)
  10. Pry.commands.alias_command 'c', 'continue'
  11. Pry.commands.alias_command 's', 'step'
  12. Pry.commands.alias_command 'n', 'next'
  13. Pry.commands.alias_command 'f', 'finish'
  14. end
  15.  
  16. if defined?(PryDebugger)
  17. Pry.commands.alias_command 'c', 'continue'
  18. Pry.commands.alias_command 's', 'step'
  19. Pry.commands.alias_command 'n', 'next'
  20. Pry.commands.alias_command 'f', 'finish'
  21. end
  22.  
  23. if defined?(PryStackExplorer)
  24. Pry.commands.alias_command 'ss', 'show-stack'
  25. Pry.commands.alias_command 'fr', 'frame'
  26. end
  27.  
  28. def what_methods(obj)
  29. (obj.public_methods - Object.public_methods - Object.instance_methods).sort
  30. end
  31.  
  32. def wm(obj)
  33. what_methods(obj)
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement