Class: Version
- Inherits:
-
Object
- Object
- Version
- Includes:
- Comparable
- Defined in:
- lib/puppet/type/ora_schema_definition/version.rb
Overview
See the file “LICENSE” for the full license governing this code.
Docs
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(version) ⇒ Version
constructor
A new instance of Version.
Constructor Details
#initialize(version) ⇒ Version
Returns a new instance of Version.
10 11 12 |
# File 'lib/puppet/type/ora_schema_definition/version.rb', line 10 def initialize(version) @version = version end |
Instance Method Details
#<=>(other) ⇒ Object
14 15 16 17 18 |
# File 'lib/puppet/type/ora_schema_definition/version.rb', line 14 def <=>(other) my_version = translate_version(@version) other = translate_version(other) Gem::Version.new(my_version) <=> Gem::Version.new(other) end |