Method: CabbageDoc::Parser#parse_templates
- Defined in:
- lib/cabbage_doc/parser.rb
#parse_templates(text) ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'lib/cabbage_doc/parser.rb', line 37 def parse_templates(text) templates = [] text.scan(/(\{(.*?)\})/) do templates << { text: $1, values: $2.split(/,/).map(&:strip) } end templates end |