Skip to content

Instantly share code, notes, and snippets.

@jasonLaster
Created July 28, 2012 19:11
Show Gist options
  • Save jasonLaster/3194448 to your computer and use it in GitHub Desktop.
Save jasonLaster/3194448 to your computer and use it in GitHub Desktop.
Pry Initialization tree

how are plugins initialized

  • bin/pry
    • require "pry"
      • load helpers
      • require classes
        • require pry_class
          • adds pry method to Pry
          • calls Pry.init
            • initializes plugin_manger,
            • initializes config
            • initializes history
            • calls reset_defaults
            • calls locate_plugins
              • adds all of the plugins to the plugin manager
        • require cli
        • add options
        • add processor block
    • calls parse_options
      • creates the option hash from the options block
      • runs the processor with the collection of options
        • as a side-effect, it starts Pry
          • Pry.start
          • finds target
          • initializes session
          • loads config files
          • loads plugins
          • activates plugins
            • require plugin
              • loads other stuff
              • initializes pry instance
              • fires when_started hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment