Class: Radius::SquiggleScanner
- Defined in:
- lib/radius/parser/squiggle_scanner.rb
Instance Method Summary collapse
-
#scanner_regex(prefix = nil) ⇒ Object
The regular expression used to find (1) opening and self-enclosed tag names, (2) self-enclosing trailing slash, (3) attributes and (4) closing tag.
Methods inherited from Scanner
Instance Method Details
#scanner_regex(prefix = nil) ⇒ Object
The regular expression used to find (1) opening and self-enclosed tag names, (2) self-enclosing trailing slash, (3) attributes and (4) closing tag
6 7 8 |
# File 'lib/radius/parser/squiggle_scanner.rb', line 6 def scanner_regex(prefix = nil) %r{\{\s*([\w:]+?)(\s+(?:\w+\s*=\s*(?:"[^"]*?"|'[^']*?')\s*)*|)(\/?)\}|\{\/([\w:]+?)\s*\}} end |