lib/roda/plugins/typecast_params.rb
# Raise an error if the array given does contains nil values.
Raise an error if the array given does contains nil values.
Raise an error if the array given does contains nil values .
def check_array!(key, arr)
          if arr
            if arr.any?{|val| val.nil?}
              handle_error(key, :invalid_type, "invalid value in array parameter #{param_name(key)}")
            end
          else
            handle_error(key, :missing, "missing parameter for #{param_name(key)}")
          end
        end
def check_array! ( key , arr ) if arr if arr . any? { | val | val . nil? } handle_error ( key , :invalid_type , "invalid value in array parameter #{param_name(key)}" ) end else handle_error ( key , :missing , "missing parameter for #{param_name(key)}" ) end end
Raise an error if the array given does contains nil values.
Raise an error if the array given does contains nil values .
key
arr