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.
650 651 652 653 |
# File 'lib/amrita2/template.rb', line 650 def initialize(parent, node) super(parent) @node = node end |
Instance Method Details
#render_me(cg) ⇒ Object
655 656 657 658 659 660 661 662 |
# File 'lib/amrita2/template.rb', line 655 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 |