module Pry::Larry

Constants

AFTER_EVAL
AFTER_SESSION
BEFORE_EVAL
BEFORE_SESSION
MEMORY
VERSION

Public Class Methods

chill(pry)
Alias for: stop
start(pry) click to toggle source
# File lib/pry-larry.rb, line 23
def self.start(pry)
  if not pry.config.hooks.hook_exists? :before_eval, BEFORE_EVAL.hash
    pry.config.hooks.add_hook :before_eval, BEFORE_EVAL.hash, BEFORE_EVAL
    pry.config.hooks.add_hook :after_eval,  AFTER_EVAL.hash , AFTER_EVAL
    pry.config.hooks.add_hook :after_session, AFTER_SESSION.hash , AFTER_SESSION
  end
end
Also aliased as: wakeup
stop(pry) click to toggle source
# File lib/pry-larry.rb, line 31
def self.stop(pry)
  pry.config.hooks.delete_hook :before_eval, BEFORE_EVAL.hash
  pry.config.hooks.delete_hook :after_eval , AFTER_EVAL.hash
  pry.config.hooks.delete_hook :after_session , AFTER_SESSION.hash
  MEMORY[pry.hash].clear
end
Also aliased as: chill
wakeup(pry)
Alias for: start