Class: SemverDialects::BelowAll

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

Overview

BelowAll represents a boundary below all possible versions. When used as the lower boundary of an interval, any version that is smaller than the upper boundary is in the interval.

Instance Attribute Summary

Attributes inherited from Boundary

#semver

Instance Method Summary collapse

Constructor Details

#initializeBelowAll

rubocop:todo Lint/MissingSuper



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

def initialize; end

Instance Method Details

#<=>(other) ⇒ Object



47
48
49
50
51
# File 'lib/semver_dialects/boundary.rb', line 47

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

  -1 if other.is_a?(Boundary)
end

#is_initial_version?Boolean

rubocop:todo Naming/PredicateName

Returns:

  • (Boolean)


43
44
45
# File 'lib/semver_dialects/boundary.rb', line 43

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

#to_sObject



39
40
41
# File 'lib/semver_dialects/boundary.rb', line 39

def to_s
  '-inf'
end