-
-
Save ahoward/3178703 to your computer and use it in GitHub Desktop.
pry without a prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def console!(&block) | |
require 'pry' | |
Pry.config.hooks.send(:hooks).keys. | |
each{|which| Pry.config.hooks.clear(which)} | |
prompt = ">> " | |
Pry.config.prompt = proc{|*a| prompt } | |
block.binding.pry | |
end | |
console!{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm curious why do you want to delete all the hooks?
Anyway you can try this code instead: