Basically, I am just trying to stop the program from running the rest of the lines if a certain condition is met.
unless raw_information.first
puts "No results were returned for that query"
break
end
However, before the program even runs I get this error:
Invalid break compile error (SyntaxError)
What is the proper way to do this?
abort("No results were returned for that query") unless condition
or
unless condition
abort("No results were returned for that query")
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With