Project

increment

0.0
No commit activity in last 3 years
No release in over 3 years
Increments the value of a number in a text file
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

#Introducing the Increment gem

If you need to keep a counter in a file then this gem is for you.

Increment.update

The statement above creates a new file called 'counter.txt' in the current directory and stores the value '1'. If the file 'counter.txt' already exists the current value is incremented and then written back to the file.

Increment.update('test')

In the above example the file 'test' is used to update and store the incremented value.