How to create an exit message

Is there a one line function call that quits the program and displays a message? I know in Perl it’s as simple as:

die("Message goes here")

I’m tired of typing this:

puts "Message goes here"
exit

4 Answers
4

Leave a Comment