summaryrefslogtreecommitdiff
path: root/cpp/rubygen/amqpgen.rb
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/rubygen/amqpgen.rb')
-rwxr-xr-xcpp/rubygen/amqpgen.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/rubygen/amqpgen.rb b/cpp/rubygen/amqpgen.rb
index 333c7dd654..7d635c99c2 100755
--- a/cpp/rubygen/amqpgen.rb
+++ b/cpp/rubygen/amqpgen.rb
@@ -174,6 +174,13 @@ class AmqpRoot < AmqpElement
end
+# Collect information about generated files.
+class GenFiles
+ @@files =[]
+ def GenFiles.add(f) @@files << f; puts f; end
+ def GenFiles.get() @@files; end
+end
+
# Base class for code generators.
# Supports setting a per-line prefix, useful for e.g. indenting code.
#
@@ -191,7 +198,7 @@ class Generator
# Create a new file, set @out.
def file(file)
- puts file
+ GenFiles.add file
if (@outdir != "-")
path=Pathname.new "#{@outdir}/#{file}"
path.parent.mkpath