class Pry::Hooks

Implements a hooks system for Pry. A hook is a callable that is associated with an event. A number of events are currently provided by Pry, these include: ‘:when_started`, `:before_session`, `:after_session`. A hook must have a name, and is connected with an event by the `Pry::Hooks#add_hook` method.

@example Adding a hook for the ‘:before_session` event.

Pry.config.hooks.add_hook(:before_session, :say_hi) do
  puts "hello"
end