Class: Amrita2::Core::CommentNode

Inherits:
BaseNode show all
Defined in:
lib/amrita2/gettext.rb,
lib/amrita2/template.rb

Overview

:nodoc: all

Instance Attribute Summary

Attributes inherited from BaseNode

#parent

Instance Method Summary collapse

Methods inherited from BaseNode

#dynamic?, #has_ruby?, #module_src, #parent_de, #root

Constructor Details

#initialize(parent, node) ⇒ CommentNode

Returns a new instance of CommentNode.



666
667
668
669
# File 'lib/amrita2/template.rb', line 666

def initialize(parent, node)
  super(parent)
  @node = node
end

Instance Method Details

#get_erb_sourceObject



29
30
31
# File 'lib/amrita2/gettext.rb', line 29

def get_erb_source
  ""
end

#render_me(cg) ⇒ Object



671
672
673
674
675
676
677
# File 'lib/amrita2/template.rb', line 671

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