Exception: Interactive::Rewindable::JumpToPrompt
- Inherits:
-
Exception
- Object
- Exception
- Interactive::Rewindable::JumpToPrompt
- Defined in:
- lib/interact/rewindable.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(prompt) ⇒ JumpToPrompt
constructor
A new instance of JumpToPrompt.
- #jump ⇒ Object
Constructor Details
#initialize(prompt) ⇒ JumpToPrompt
Returns a new instance of JumpToPrompt.
18 19 20 |
# File 'lib/interact/rewindable.rb', line 18 def initialize(prompt) @prompt = prompt end |
Instance Method Details
#jump ⇒ Object
22 23 24 25 |
# File 'lib/interact/rewindable.rb', line 22 def jump print "\n" @prompt[0].call(@prompt) end |