Sha256: 6e3bd913cff023b94090f4ec8523bf5bbbd2a72d6b2d79796cd5df183e35bbfb
Contents?: true
Size: 942 Bytes
Versions: 9
Compression:
Stored size: 942 Bytes
Contents
# frozen_string_literal: true class Pagy class << self # deprecated variables def deprecated_var(var, val, new_var, new_val) value = val || new_val Warning.warn %([PAGY WARNING] deprecated use of '#{var}' var will not be supported in 5.0! Use '#{new_var}: #{value.inspect}' instead.) value end # deprecated pagy_url_for argument order def deprecated_order(pagy, page) Warning.warn %([PAGY WARNING] inverted use of pagy/page in pagy_url_for will not be supported in 5.0! Use pagy_url_for(pagy, page) instead.) [page, pagy] end # deprecated posiitioal arguments def deprecated_arg(arg, val, new_key, new_val) value = val || new_val # we use the new_val if present Warning.warn %([PAGY WARNING] deprecated use of positional '#{arg}' arg will not be supported in 5.0! Use only the keyword arg '#{new_key}: #{value.inspect}' instead.) value end end end
Version data entries
9 entries across 9 versions & 2 rubygems