1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
pry--pry/examples/example_prompt.rb

9 lines
418 B
Ruby

require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
# Remember, first prompt in array is the main prompt, second is the wait
# prompt (used for multiline input when more input is required)
my_prompt = [ proc { |obj, *| "inside #{obj}> " },
proc { |obj, *| "inside #{obj}* "} ]
# Start a Pry session using the prompt defined in my_prompt
Pry.start(TOPLEVEL_BINDING, :prompt => my_prompt)