lib/vacman_controller/token/properties.rb
# The library also does these checks, but we want to present
# custom error message to the caller.
#
The library also does these checks, but we want to present
custom error message to the caller.
The library also does these checks but we want to present custom error message to the caller .
def write_check_bounds!(property, value, bounds)
          min, max = bounds
          if value < min || value > max
            raise VacmanController::Error,
              "Invalid #{property} value provided: #{value}. " \
              "Must be between greater than #{min} and less than #{max}."
          end
          value
        end
def write_check_bounds! ( property , value , bounds ) min , max = bounds if value < min || value > max raise VacmanController :: Error , "Invalid #{property} value provided: #{value}. " "Must be between greater than #{min} and less than #{max}." end value end
The library also does these checks, but we want to present
custom error message to the caller.
The library also does these checks but we want to present custom error message to the caller .
property
value
bounds