Class: Librarian::Manifest::Version
- Inherits:
-
Object
- Object
- Librarian::Manifest::Version
- Includes:
- Comparable
- Defined in:
- lib/librarian/manifest.rb
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(*args) ⇒ Version
constructor
A new instance of Version.
- #inspect ⇒ Object
- #to_gem_version ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(*args) ⇒ Version
Returns a new instance of Version.
9 10 11 12 13 |
# File 'lib/librarian/manifest.rb', line 9 def initialize(*args) args = initialize_normalize_args(args) self.backing = Gem::Version.new(*args) end |
Instance Method Details
#<=>(other) ⇒ Object
19 20 21 |
# File 'lib/librarian/manifest.rb', line 19 def <=>(other) to_gem_version <=> other.to_gem_version end |
#inspect ⇒ Object
27 28 29 |
# File 'lib/librarian/manifest.rb', line 27 def inspect "#<#{self.class} #{to_s}>" end |
#to_gem_version ⇒ Object
15 16 17 |
# File 'lib/librarian/manifest.rb', line 15 def to_gem_version backing end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/librarian/manifest.rb', line 23 def to_s to_gem_version.to_s end |