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.



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

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)


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

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.



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

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.



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

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