Is there any way to increment a no. each time the file gets executed in ruby.
I didn’t find anything in this matter.
I want to declare a no. and then it will be incremented each time the file in which it resides gets executed.
I can use file to keep track of last no. used but is there any simple solution
Is there any way to increment a no. each time the file gets executed
Share
This method will give me next no each time I call it and also will keep track of it thanks to Alex D