Class: GitBump::Version
- Inherits:
-
Object
- Object
- GitBump::Version
- Defined in:
- lib/git_bump.rb
Instance Method Summary collapse
-
#initialize(string) ⇒ Version
constructor
A new instance of Version.
- #to_a ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(string) ⇒ Version
Returns a new instance of Version.
50 51 52 |
# File 'lib/git_bump.rb', line 50 def initialize(string) @components = string.split('.') end |
Instance Method Details
#to_a ⇒ Object
58 59 60 |
# File 'lib/git_bump.rb', line 58 def to_a @components.dup end |
#to_s ⇒ Object
54 55 56 |
# File 'lib/git_bump.rb', line 54 def to_s @components.join('.') end |