Skip to content

Instantly share code, notes, and snippets.

@paulanthonywilson
Created March 10, 2019 23:05

Revisions

  1. paulanthonywilson created this gist Mar 10, 2019.
    18 changes: 18 additions & 0 deletions alan.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@

    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