Class: Vim::Flavor::PlainVersion
- Inherits:
-
Gem::Version
- Object
- Gem::Version
- Vim::Flavor::PlainVersion
- Defined in:
- lib/vim-flavor/plainversion.rb
Instance Attribute Summary collapse
-
#original_tag_name ⇒ Object
Returns the value of attribute original_tag_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tag_name) ⇒ PlainVersion
constructor
A new instance of PlainVersion.
- #to_revision ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(tag_name) ⇒ PlainVersion
Returns a new instance of PlainVersion.
6 7 8 9 |
# File 'lib/vim-flavor/plainversion.rb', line 6 def initialize(tag_name) @original_tag_name = tag_name super(self.class.normalize_tag_name(tag_name)) end |
Instance Attribute Details
#original_tag_name ⇒ Object
Returns the value of attribute original_tag_name.
4 5 6 |
# File 'lib/vim-flavor/plainversion.rb', line 4 def original_tag_name @original_tag_name end |
Class Method Details
.correct?(tag_name) ⇒ Boolean
15 16 17 |
# File 'lib/vim-flavor/plainversion.rb', line 15 def self.correct?(tag_name) super(normalize_tag_name(tag_name)) end |
.normalize_tag_name(tag_name) ⇒ Object
11 12 13 |
# File 'lib/vim-flavor/plainversion.rb', line 11 def self.normalize_tag_name(tag_name) tag_name.to_s.sub(/^v/, '') end |
Instance Method Details
#to_revision ⇒ Object
23 24 25 |
# File 'lib/vim-flavor/plainversion.rb', line 23 def to_revision() to_s end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/vim-flavor/plainversion.rb', line 19 def to_s() @original_tag_name end |