-
-
Save anonymous/c71db3d54a7245e45d2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
menu.choice :Bonifico do | |
recipient_id = ask('Indica il numero di conto che deve ricevere il bonifico: ', Integer) | |
amount = ask('Indica la somma da bonificare: ', Integer) | |
if agree('Sei sicuro di voler effettuare questa operazione? ', true) | |
if @account.transfer(recipient_id, amount) | |
color 'Operazione effettuata con successo', :green | |
else | |
color 'Operazione fallita, conto della controparte sconosciuto o credito insufficiente', :red | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment