Class: CGenerator::CFile::CommentAccumulator

Inherits:
Accumulator
  • Object
show all
Defined in:
lib/cgen/cgen.rb

Instance Attribute Summary

Attributes inherited from Accumulator

#name, #parent

Instance Method Summary collapse

Methods inherited from Accumulator

#accept?, #add, #add_one, #add_one_really, #initialize, #inspect, #inspect_one, #output, #output_one, #separator

Constructor Details

This class inherits a constructor from CGenerator::Accumulator

Instance Method Details

#to_sObject



1448
1449
1450
1451
1452
1453
1454
1455
# File 'lib/cgen/cgen.rb', line 1448

def to_s
  str = super
  if str.length > 0
    str.gsub(/^(?!\/\/)/, "// ")
  else
    str
  end
end