Skip to content

Instantly share code, notes, and snippets.

@paulanthonywilson
Created March 10, 2019 23:05
Show Gist options
  • Save paulanthonywilson/caf384698fe2f267038d810de7a2fd00 to your computer and use it in GitHub Desktop.
Save paulanthonywilson/caf384698fe2f267038d810de7a2fd00 to your computer and use it in GitHub Desktop.
def read_from_car
p "I am reading stuff from the car. I will return the result."
# Or maybe I'll return nil if unsuccesful (or if there's an exception that's
# also fine but will need rescuing somewhere)
end
def send_stuff_to_cloud_kit(stuff)
p "sending the stuff to cloudkit: #{stuff}"
end
stuff = read_from_car
unless stuff.nil?
send_stuff_to_cloud_kit(stuff)
else
send_stuff_to_cloud_kit("the thing to send if it failed")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment