Class: Amrita2::Filters::NVar
- Includes:
- NVarMixin
- Defined in:
- lib/amrita2/template.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(*names) ⇒ NVar
constructor
A new instance of NVar.
- #renderer_code(de, cg, element) ⇒ Object
Methods inherited from Base
filter_method, inherited, #parse_filter_a, #|
Constructor Details
#initialize(*names) ⇒ NVar
Returns a new instance of NVar.
2361 2362 2363 |
# File 'lib/amrita2/template.rb', line 2361 def initialize(*names) @names = names end |
Instance Method Details
#renderer_code(de, cg, element) ⇒ Object
2365 2366 2367 2368 2369 |
# File 'lib/amrita2/template.rb', line 2365 def renderer_code(de, cg, element) make_tupple_code(cg) if @names.size > 0 s = replace_args(element).to_s cg.put_string_expression(s.inspect.gsub(/\\#/, "#")) end |