Class: Pry
Instance Method Summary collapse
-
#rep(target = TOPLEVEL_BINDING) ⇒ Object
To make the console more useful, we make it so we flush the event registry after each line.
Instance Method Details
#rep(target = TOPLEVEL_BINDING) ⇒ Object
To make the console more useful, we make it so we flush the event registry after each line. This makes it so events are triggered after each line. To accomplish this we monkey-patch pry.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/volt/cli/console.rb', line 7 def rep(target = TOPLEVEL_BINDING) target = Pry.binding_for(target) result = re(target) Pry.critical_section do show_result(result) end # Automatically flush after each line Volt::Computation.flush! end |