Exception: Interactive::Rewindable::JumpToPrompt

Inherits:
Exception
  • Object
show all
Defined in:
lib/interact/rewindable.rb

Overview

:nodoc:

Instance Method Summary collapse

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

#jumpObject



22
23
24
25
# File 'lib/interact/rewindable.rb', line 22

def jump
  print "\n"
  @prompt[0].call(@prompt)
end