Class: Puppet::Util::Package::Version::Range::MinMax Private

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/util/package/version/range/min_max.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(min, max) ⇒ MinMax

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of MinMax.


6
7
8
9
# File 'lib/puppet/util/package/version/range/min_max.rb', line 6

def initialize(min, max)
  @min = min
  @max = max
end

Instance Method Details

#include?(version) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)

16
17
18
# File 'lib/puppet/util/package/version/range/min_max.rb', line 16

def include?(version)
  @min.include?(version) && @max.include?(version)
end

#to_gem_versionObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


13
14
15
# File 'lib/puppet/util/package/version/range/min_max.rb', line 13

def to_gem_version
  "#{@min}, #{@max}"
end

#to_sObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'lib/puppet/util/package/version/range/min_max.rb', line 10

def to_s
  "#{@min} #{@max}"
end