Class: Pact::SpecificationVersion

Inherits:
Gem::Version
  • Object
show all
Defined in:
lib/pact/specification_version.rb

Constant Summary collapse

NIL_VERSION =
Pact::SpecificationVersion.new('0')

Instance Method Summary collapse

Instance Method Details

#===(other) ⇒ Object



8
9
10
# File 'lib/pact/specification_version.rb', line 8

def === other
  major && major == other
end

#after?(other) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/pact/specification_version.rb', line 12

def after? other
  major && other < major
end

#majorObject



4
5
6
# File 'lib/pact/specification_version.rb', line 4

def major
  segments.first
end