lib/right_hook/authenticator.rb
def find_or_create_authorization_by_note(note)
      found_auth = list_authorizations.find {|auth| auth.note == note}
      if found_auth
        found_auth.token
      else
        create_authorization(note)
      end
    end
def find_or_create_authorization_by_note(note)
      found_auth = list_authorizations.find {|auth| auth.note == note}
      if found_auth
        found_auth.token
      else
        create_authorization(note)
      end
    end
def find_or_create_authorization_by_note ( note ) found_auth = list_authorizations . find { | auth | auth . note == note } if found_auth found_auth . token else create_authorization ( note ) end end
If there is already an authorization by this note, use it; otherwise create it
If there is already an authorization by this note use it ; otherwise create it