ExPrompt.confirm
You're seeing just the function
confirm
, go back to ExPrompt module for more information.
Specs
Asks for confirmation to the user. It allows the user to answer or respond with the following options:
- Yes, yes, YES, Y, y
- No, no, NO, N, n
In case that the answer is none of the above, it will prompt again until we do or the default value if it's present.
Examples
To ask whether the user wants to delete a file or not:
ExPrompt.confirm("Are you sure you want to delete this file?")
It's the same example above, returning false as default.
ExPrompt.confirm("Are you sure you want to delete this file?", false)