diff options
| author | Alan Conway <aconway@apache.org> | 2007-08-05 10:44:13 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-08-05 10:44:13 +0000 |
| commit | dd3e2d4f1768abbff0a638f68f50a5ea44ed47ef (patch) | |
| tree | 503b5cd9fe470cde104ebf4b0b59ed3f4cc7e983 /cpp/rubygen/amqpgen.rb | |
| parent | 744a9369e5e145fee41c0e2587a22882ecbbcc33 (diff) | |
| download | qpid-python-dd3e2d4f1768abbff0a638f68f50a5ea44ed47ef.tar.gz | |
* amqpgen.rb: fix sytax error.
* cppgen.rb:
- 0-10 types
- typedef generator
- automatic whitespace around classes etc.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@562845 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/rubygen/amqpgen.rb')
| -rwxr-xr-x | cpp/rubygen/amqpgen.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/cpp/rubygen/amqpgen.rb b/cpp/rubygen/amqpgen.rb index 0b7cfac5ea..5cad9d6336 100755 --- a/cpp/rubygen/amqpgen.rb +++ b/cpp/rubygen/amqpgen.rb @@ -76,7 +76,7 @@ end class AmqpMethod < AmqpElement def initialize(xml, amqp) super; end - def index attr["index"]; end + def index() attributes["index"]; end def fields() @cache_fields ||= elements.collect("field") { |f| AmqpField.new(f,self); } @@ -101,7 +101,7 @@ end # AMQP class element. class AmqpClass < AmqpElement def initialize(xml,amqp) super; end - def index attr["index"]; end + def index() attributes["index"]; end def methods() @cache_methods ||= elements.collect("method") { |el| AmqpMethod.new(el,self) @@ -173,16 +173,12 @@ class Generator end # Create a new file, set @out. - def file(file, &block) + def file(file) puts file if (@outdir != "-") path=Pathname.new "#{@outdir}/#{file}" path.parent.mkpath - if &block path.open('w') { |@out| yield } - else - path.open('w') - end end end |
