Class: Version

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/puppet/type/ora_schema_definition/version.rb

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ Version

Returns a new instance of Version.



4
5
6
# File 'lib/puppet/type/ora_schema_definition/version.rb', line 4

def initialize( version)
  @version = version
end

Instance Method Details

#<=>(other_version) ⇒ Object



8
9
10
11
12
# File 'lib/puppet/type/ora_schema_definition/version.rb', line 8

def <=>( other_version)
  my_version    = translate_version(@version)
  other_version = translate_version(other_version)
  Gem::Version.new(my_version) <=>  Gem::Version.new(other_version)
end