summaryrefslogtreecommitdiff
path: root/qpid/cpp/rubygen/amqpgen.rb
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-08-14 16:15:26 +0000
committerAlan Conway <aconway@apache.org>2007-08-14 16:15:26 +0000
commitaa0e4df68168895d4a55d687e6acd239eccd2e69 (patch)
tree63029a1fbef01df25a84dedb618d7235ff734b2b /qpid/cpp/rubygen/amqpgen.rb
parent284aec62741c7dc069c8e7199a5ce3bf61c277ff (diff)
downloadqpid-python-aa0e4df68168895d4a55d687e6acd239eccd2e69.tar.gz
Removed unused types: RequestId, ResponseId, MethodContext.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@565821 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/rubygen/amqpgen.rb')
-rwxr-xr-xqpid/cpp/rubygen/amqpgen.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/qpid/cpp/rubygen/amqpgen.rb b/qpid/cpp/rubygen/amqpgen.rb
index edfbce2576..a144825f08 100755
--- a/qpid/cpp/rubygen/amqpgen.rb
+++ b/qpid/cpp/rubygen/amqpgen.rb
@@ -188,6 +188,7 @@ class Generator
@outdir=outdir
@prefix='' # For indentation or comments.
@indentstr=' ' # One indent level.
+ @outdent=2
raise "Invalid output directory: #{outdir}" unless @outdir=="-" or File.directory?(@outdir)
end
@@ -229,6 +230,14 @@ class Generator
# Generate indented code
def indent(n=1,&block) prefix(@indentstr * n,&block); end
+ # Generate outdented code
+ def outdent(&block)
+ save=@prefix
+ @prefix=@prefix[0...-2]
+ yield
+ @prefix=save
+ end
+
attr_accessor :out
end