Update liquid docs for named parameters

The YARD liquid gem now supports specifying named parameters. For the
core liquid tags and filters this is the only object I could find that
needed to be updated.
This commit is contained in:
Gray Gilmore
2024-10-24 09:56:50 -07:00
parent b3553787c8
commit 8d7ed706f4
+1 -1
View File
@@ -877,7 +877,7 @@ module Liquid
# - [`nil`](/docs/api/liquid/basics#nil) # - [`nil`](/docs/api/liquid/basics#nil)
# @liquid_syntax variable | default: variable # @liquid_syntax variable | default: variable
# @liquid_return [untyped] # @liquid_return [untyped]
# @liquid_optional_param allow_false [boolean] Whether to use false values instead of the default. # @liquid_optional_param allow_false: [boolean] Whether to use false values instead of the default.
def default(input, default_value = '', options = {}) def default(input, default_value = '', options = {})
options = {} unless options.is_a?(Hash) options = {} unless options.is_a?(Hash)
false_check = options['allow_false'] ? input.nil? : !Liquid::Utils.to_liquid_value(input) false_check = options['allow_false'] ? input.nil? : !Liquid::Utils.to_liquid_value(input)