Reputation: 589
I have the following line of code:
str.start_with?("str1", "str2", "str3")
Is it possible I can pass a variable/list into this function instead? Something like:
list_of_strs = ["str1", "str2", "str3"]
str.start_with?(list_of_strs)
Upvotes: 0
Views: 51