Class: Amanuensis::Version
- Inherits:
-
Struct
- Object
- Struct
- Amanuensis::Version
- Defined in:
- lib/amanuensis/version.rb
Instance Attribute Summary collapse
-
#tag ⇒ Object
Returns the value of attribute tag.
Instance Method Summary collapse
Instance Attribute Details
#tag ⇒ Object
Returns the value of attribute tag
4 5 6 |
# File 'lib/amanuensis/version.rb', line 4 def tag @tag end |
Instance Method Details
#get ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/amanuensis/version.rb', line 6 def get major, minor, patch = *previous case Amanuensis.version.to_sym when :minor minor += 1 when :major major += 1 when :patch patch += 1 end [major, minor, patch].join '.' end |
#previous ⇒ Object
21 22 23 |
# File 'lib/amanuensis/version.rb', line 21 def previous tag.split('.').map(&:to_i) end |