Class: SemverDialects::AboveAll

Inherits:
Boundary
  • Object
show all
Defined in:
lib/semver_dialects/boundary.rb

Overview

AboveAll represents a boundary above all possible versions. When used as the upper boundary of an interval, any version that is greater than the lower boundary is in the interval.

Instance Attribute Summary

Attributes inherited from Boundary

#semver

Instance Method Summary collapse

Constructor Details

#initializeAboveAll

rubocop:todo Lint/MissingSuper



58
# File 'lib/semver_dialects/boundary.rb', line 58

def initialize; end

Instance Method Details

#<=>(other) ⇒ Object



68
69
70
71
72
# File 'lib/semver_dialects/boundary.rb', line 68

def <=>(other)
  return 0 if other.instance_of?(AboveAll)

  1 if other.is_a?(Boundary)
end

#is_initial_version?Boolean

rubocop:todo Naming/PredicateName

Returns:

  • (Boolean)


64
65
66
# File 'lib/semver_dialects/boundary.rb', line 64

def is_initial_version? # rubocop:todo Naming/PredicateName
  false
end

#to_sObject



60
61
62
# File 'lib/semver_dialects/boundary.rb', line 60

def to_s
  '+inf'
end