Class: EachExpression
- Inherits:
-
Object
- Object
- EachExpression
- Defined in:
- lib/thymeleaf/dialects/default/parsers/each.rb
Overview
Matches: “item, stat : $iterator”, “item : $iterator” or “$iterator”
Class Method Summary collapse
Class Method Details
.parse(context, expr, **args) ⇒ Object
7 8 9 10 11 |
# File 'lib/thymeleaf/dialects/default/parsers/each.rb', line 7 def self.parse(context, expr, **args) md = expr.match(/\s*(?:([^\n,]+?)\s*(?:,\s*([^\n,]*?))?\s*:\s*)?\${(.+?)}/) raise ArgumentError, "Not a valid each expression" if md.nil? md[1..3] end |