Class: Rubicon::Version
- Inherits:
-
Object
- Object
- Rubicon::Version
- Defined in:
- lib/rubicon/version.rb
Constant Summary collapse
- POSITIONS =
{ major: 0, minor: 1, patch: 2 }.freeze
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
Instance Method Summary collapse
-
#initialize ⇒ Version
constructor
A new instance of Version.
- #release(category) ⇒ Object
Methods included from Git
Methods included from File
Constructor Details
#initialize ⇒ Version
Returns a new instance of Version.
10 11 12 |
# File 'lib/rubicon/version.rb', line 10 def initialize @current = read end |
Instance Attribute Details
#current ⇒ Object (readonly)
Returns the value of attribute current.
8 9 10 |
# File 'lib/rubicon/version.rb', line 8 def current @current end |
Instance Method Details
#release(category) ⇒ Object
14 15 16 17 18 |
# File 'lib/rubicon/version.rb', line 14 def release(category) new_version = bump_version(category).join('.') write(new_version) git_tag(new_version) end |