Question : exit program ruby
Answered by : yann-petitjean
# You can exit by calling a method
exit
exit!
abort("She cannot take any more of this, Captain!")
# ...or by failing to catch an exception
raise("Destroyed...")
fail
# ...or by letting the program end naturally. :)
Source : https://www.honeybadger.io/blog/how-to-exit-a-ruby-program/ | Last Update : Sun, 05 Apr 20