I m getting input from a user using Ruby s Highline gem. I m asking the following
note = ask("Enter a note for this entry: ")
This is fine, but If the user edits the entry I want to populate the prompt with their existing answer for this question so that it can be edited directly instead of entering it again.
类似:
note = ask("Enter a note for this entry: ", :current => note)
# Output:
Enter a note for this entry: the current note_