Skip to content

Instantly share code, notes, and snippets.

/mbi.rb Secret

Created August 15, 2015 10:25
Show Gist options
  • Save anonymous/c71db3d54a7245e45d2f to your computer and use it in GitHub Desktop.
Save anonymous/c71db3d54a7245e45d2f to your computer and use it in GitHub Desktop.
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