Module: BuildInteger
- Defined in:
- lib/build_integer.rb,
lib/build_integer/version.rb
Constant Summary collapse
- BUILD_NUMBER_FILE_NAME =
".build-number"
- VERSION =
"0.1.0"
- @@current_build_number =
0
Class Method Summary collapse
- .current ⇒ Object
- .decrement ⇒ Object
- .find ⇒ Object
- .increment ⇒ Object
- .reset ⇒ Object
- .set_build_number(build_number) ⇒ Object
Class Method Details
.current ⇒ Object
12 13 14 |
# File 'lib/build_integer.rb', line 12 def self.current @@current_build_number end |
.decrement ⇒ Object
22 23 24 25 26 |
# File 'lib/build_integer.rb', line 22 def self.decrement @@current_build_number -= 1 write_file @@current_build_number end |
.find ⇒ Object
7 8 9 10 |
# File 'lib/build_integer.rb', line 7 def self.find read_or_create @@current_build_number end |
.increment ⇒ Object
16 17 18 19 20 |
# File 'lib/build_integer.rb', line 16 def self.increment @@current_build_number += 1 write_file @@current_build_number end |
.reset ⇒ Object
34 35 36 37 38 |
# File 'lib/build_integer.rb', line 34 def self.reset @@current_build_number = 0 write_file @@current_build_number end |
.set_build_number(build_number) ⇒ Object
28 29 30 31 32 |
# File 'lib/build_integer.rb', line 28 def self.set_build_number(build_number) @@current_build_number = build_number write_file @@current_build_number end |