Module: Repl
- Defined in:
- lib/repl.rb
Instance Method Summary collapse
Instance Method Details
#repl ⇒ Object
5 6 7 8 |
# File 'lib/repl.rb', line 5 def repl DEFAULT_STARTING_SELF.cb binding REPL_CONTEXT_STACK.push(binding) end |
#stop_repl ⇒ Object
10 11 12 13 |
# File 'lib/repl.rb', line 10 def stop_repl REPL_CONTEXT_STACK.pop if (binding == REPL_CONTEXT_STACK.last) DEFAULT_STARTING_SELF.cb( REPL_CONTEXT_STACK.empty? ? DEFAULT_STARTING_SELF : REPL_CONTEXT_STACK.pop ) end |