Class | Liquid::Context |
In: |
lib/liquid/context.rb
|
Parent: | Object |
environments | [R] | |
errors | [R] | |
exception_handler | [RW] | |
registers | [R] | |
resource_limits | [R] | |
scopes | [R] |
Look up variable, either resolve directly after considering the name. We can directly handle Strings, digits, floats and booleans (true,false). If no match is made we lookup the variable in the current scope and later move up to the parent blocks to see if we can resolve the variable somewhere up the tree. Some special keywords return symbols. Those symbols are to be called on the rhs object in expressions
Example:
products == empty #=> products.empty?
Adds filters to this context.
Note that this does not register the filters with the main Template object. see Template.register_filter for that