Class: Amrita2::Core::StaticNode
- Defined in:
- lib/amrita2/template.rb
Overview
:nodoc: all
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BaseNode
Instance Method Summary collapse
-
#initialize(parent, node) ⇒ StaticNode
constructor
A new instance of StaticNode.
- #render_me(cg) ⇒ Object
Methods inherited from BaseNode
#dynamic?, #has_ruby?, #module_src, #parent_de, #root
Constructor Details
#initialize(parent, node) ⇒ StaticNode
Returns a new instance of StaticNode.
765 766 767 768 |
# File 'lib/amrita2/template.rb', line 765 def initialize(parent, node) super(parent) @node = node end |
Instance Method Details
#render_me(cg) ⇒ Object
770 771 772 773 774 775 776 777 |
# File 'lib/amrita2/template.rb', line 770 def render_me(cg) #cg.put_string_expression(cg.define_constant(@node.to_s.inspect)) # to keep s = "" @node.output(s, :preserve=>true) cg.put_string_expression(cg.define_constant(s.inspect)) end |