Class: Dependabot::Devcontainers::Version

Inherits:
Version
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/devcontainers/version.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/dependabot/devcontainers/version.rb', line 25

def <=>(other)
  if self == other
    precision <=> other.precision
  else
    super
  end
end

#same_precision?(other) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/dependabot/devcontainers/version.rb', line 15

def same_precision?(other)
  precision == other.precision
end

#satisfies?(requirement) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/dependabot/devcontainers/version.rb', line 20

def satisfies?(requirement)
  requirement.satisfied_by?(self)
end