Method: Inspec::Shell#configure_pry
- Defined in:
- lib/inspec/shell.rb
#configure_pry ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/inspec/shell.rb', line 23 def configure_pry # Remove all hooks and checks Pry.hooks.clear_all that = self # Add the help command Pry::Commands.block_command 'help', 'Show examples' do |resource| that.help(resource) end # configure pry shell prompt Pry.config.prompt_name = 'inspec' Pry.prompt = [proc { "\e[0;32m#{Pry.config.prompt_name}>\e[0m " }] # Add a help menu as the default intro Pry.hooks.add_hook(:before_session, :intro) do intro end end |