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.
68 69 70 |
# File 'lib/git_bump.rb', line 68 def initialize(string) @components = string.split('.') end |
Instance Method Details
#to_a ⇒ Object
76 77 78 |
# File 'lib/git_bump.rb', line 76 def to_a @components.dup end |
#to_s ⇒ Object
72 73 74 |
# File 'lib/git_bump.rb', line 72 def to_s @components.join('.') end |