Don't waste sms messages if we didn't get a lunch menu.
This commit is contained in:
parent
3a7ffab839
commit
c8ec4870f8
|
@ -21,6 +21,11 @@ end
|
|||
lunch = LunchScraper.new(Date.today)
|
||||
menu = lunch.today
|
||||
|
||||
if menu.count.zero?
|
||||
STDERR.puts 'No menu items found.'
|
||||
exit 1
|
||||
end
|
||||
|
||||
client = Twilio::REST::Client.new(ENV['TWILIO_ACCOUNT_SID'], ENV['TWILIO_AUTH_TOKEN'])
|
||||
|
||||
destinations = ENV['TO'].split(',')
|
||||
|
|
Loading…
Reference in a new issue