Class: Treetop::Runtime::UserTemplateNode
- Inherits:
-
TemplateNode
- Object
- SyntaxNode
- TemplateNode
- Treetop::Runtime::UserTemplateNode
- Defined in:
- lib/alongslide/treetop/parser.rb
Overview
Templates which go inside panels.
Instance Method Summary collapse
- #is_user_template ⇒ Object
-
#render_params ⇒ Object
Params for panel content template.
Methods inherited from TemplateNode
#render, #template_content, #template_name
Instance Method Details
#is_user_template ⇒ Object
127 128 129 |
# File 'lib/alongslide/treetop/parser.rb', line 127 def is_user_template true end |
#render_params ⇒ Object
Params for panel content template.
Key/value pairs.
If value is a quoted string, strip quotes.
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/alongslide/treetop/parser.rb', line 113 def render_params params = {} if respond_to? :template_params template_params.elements.map do |item| key = item.param.key.text_value value = item.param.value.text_value params[key.to_sym] = unquote value end end super.merge params end |