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

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

Instance Method Summary collapse

Constructor Details

#initialize(min, max) ⇒ MinMax

Returns a new instance of MinMax.



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

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

Instance Method Details

#include?(version) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/puppet/util/package/version/range/min_max.rb', line 21

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

#to_gem_versionObject



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

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

#to_sObject



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

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