I have this statement:
string_tokens[-1].ends_with?(",") || string_tokens[-1].ends_with?("-") || string_tokens[-1].ends_with?("&")
I would like to put all the tokens (","
, "-"
, "&"
) into a constant and simplify the above to ask, "does the string end with any of these characters", but I'm not sure how to do that.