Method: CloudFlock::App::Common#retry_prompt
- Defined in:
- lib/cloudflock/app/common/servers.rb
#retry_prompt(message, prompt = 'Try again? (Y/N)') ⇒ Object
Public: Display a failure message to the user and prompt whether to retry.
message - String containing a failure message. prompt - Prompt to present to the user (default: ‘Try again? (Y/N)’).
Returns true or false indicating whether the user wishes to retry.
1005 1006 1007 1008 |
# File 'lib/cloudflock/app/common/servers.rb', line 1005 def retry_prompt(, prompt = 'Try again? (Y/N)') error = UI.red { "#{} #{prompt}".strip } UI.prompt_yn(error, default_answer: 'Y') end |