Module Interactive::Rewindable
In: lib/interact/rewindable.rb

Copyright (c) 2012 Alex Suraci

Methods

ask   finalize   handler   with_char_io  

Included Modules

Interactive

Public Instance methods

Ask a question and get an answer. Rewind-aware; call disable_rewind on your class to disable.

See Interact#ask for the other possible values in options.

question
The prompt, without ": " at the end.
options
An optional hash containing the following options.
forget:Set to true to prevent rewinding from remembering the user‘s answer.

Clear prompts.

Questions asked after this are rewindable, but questions asked beforehand are no longer reachable.

Use this after you‘ve performed some mutation based on the user‘s input.

[Validate]