Puppet Function: validate_between

Defined in:
lib/puppet/parser/functions/validate_between.rb
Function type:
Ruby 3.x API

Overview

validate_between()Boolean

Validate that the first value is between the second and third values numerically.

This is a pure Ruby comparison, not a human comparison.

Returns:

  • (Boolean)


2
3
4
5
6
7
8
9
10
11
12
# File 'lib/puppet/parser/functions/validate_between.rb', line 2

newfunction(:validate_between, :arity => 3, :doc => <<-'ENDHEREDOC') do |args|

  args[0].to_s.between?(args[1].to_s, args[2].to_s)
  Validate that the first value is between the second and third values
  numerically.

  This is a pure Ruby comparison, **not** a human comparison.

  @return [Boolean]
  ENDHEREDOC
end