Class: Puppet::Util::Package::Version::Range::MinMax
- Defined in:
- lib/puppet/util/package/version/range/min_max.rb
Instance Method Summary collapse
- #include?(version) ⇒ Boolean
-
#initialize(min, max) ⇒ MinMax
constructor
A new instance of MinMax.
- #to_gem_version ⇒ Object
- #to_s ⇒ Object
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
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_version ⇒ Object
17 18 19 |
# File 'lib/puppet/util/package/version/range/min_max.rb', line 17 def to_gem_version "#{@min}, #{@max}" end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/puppet/util/package/version/range/min_max.rb', line 13 def to_s "#{@min} #{@max}" end |