Liquid::Context
Inherits Reference / Object
Constants
FLOATS = /^(-?\d[\d\.]+)$/
INTEGERS = /^(-?\d+)$/
LITERALS = Regex.union([FLOATS, INTEGERS, RANGES, STRINGS])
RANGES = /^\((\S+)\.\.(\S+)\)$/
SquareBracketed = /^\[(.*)\]$/
STRINGS = /^['"](.*)['"]$/
Constructors
Instance methods
[](key)
SourceOnly allow String, Numeric, Hash, Array, Proc, Boolean or <tt>Liquid::Drop</tt>
Adds filters to this context.
Note that this does not register the filters with the main Template object. see <tt>Template.register_filter</tt> for that
clear_instance_assigns
Sourceenvironments
Sourceerrors
Sourcefetch(key)
Sourcehandle_error(e)
Sourcehas_key?(key)
Sourceinvoke(method, *args)
SourcePush new local scope on the stack. use <tt>Context#stack</tt> instead
registers
Sourcescopes
SourcePushes a new local scope on the stack, pops it at the end of the block
Example: context.stack do context["var"] = "hi" end
context["var] #=> nil
strainer
Sourceto_liquid
Source