I work with an API that requires me to pass numbers as strings. I need to increment the counter on every call.
I am using the following code:
days = days.to_i
days += 1
days = days.to_s
It works, but it seems messy. Is there another way to do this in Ruby?
source
share