diff options
| author | Alan Conway <aconway@apache.org> | 2007-08-09 14:39:07 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-08-09 14:39:07 +0000 |
| commit | dd7aef35baa0fcda7f19851aecac3225f9a7b4b7 (patch) | |
| tree | 80730c3bf9dbf130a79b450731a8e03f21db4ad7 /qpid/cpp/rubygen/amqpgen.rb | |
| parent | 61bc423099806cdfb952dfd730989e11a8ce106e (diff) | |
| download | qpid-python-dd7aef35baa0fcda7f19851aecac3225f9a7b4b7.tar.gz | |
Avoid clash with built-in ruby function Object.methods():n
- Renamed methods*() to amqp_methods, classes*() to amqp_classes.
- Renamed CppGen.class_() to cpp_class.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@564225 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/rubygen/amqpgen.rb')
| -rwxr-xr-x | qpid/cpp/rubygen/amqpgen.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/qpid/cpp/rubygen/amqpgen.rb b/qpid/cpp/rubygen/amqpgen.rb index ae8e4c5d1c..49f8c0061e 100755 --- a/qpid/cpp/rubygen/amqpgen.rb +++ b/qpid/cpp/rubygen/amqpgen.rb @@ -106,16 +106,16 @@ end class AmqpClass < AmqpElement def initialize(xml,amqp) super; end def index() attributes["index"]; end - def methods() - @cache_methods ||= elements.collect("method") { |el| + def amqp_methods() + @cache_amqp_methods ||= elements.collect("method") { |el| AmqpMethod.new(el,self) }.sort_by_name end # chassis should be "client" or "server" - def methods_on(chassis) - @cache_methods_on ||= { } - @cache_methods_on[chassis] ||= elements.collect("method/chassis[@name='#{chassis}']/..") { |m| + def amqp_methods_on(chassis) + @cache_amqp_methods_on ||= { } + @cache_amqp_methods_on[chassis] ||= elements.collect("method/chassis[@name='#{chassis}']/..") { |m| AmqpMethod.new(m,self) }.sort_by_name end @@ -139,17 +139,17 @@ class AmqpRoot < AmqpElement attributes["major"]+"-"+attributes["minor"] end - def classes() - @cache_classes ||= elements.collect("class") { |c| AmqpClass.new(c,self) }.sort_by_name + def amqp_classes() + @cache_amqp_classes ||= elements.collect("class") { |c| AmqpClass.new(c,self) }.sort_by_name end # Return all methods on all classes. - def methods() classes.collect { |c| c.methods }.flatten; end + def amqp_methods() amqp_classes.collect { |c| c.amqp_methods }.flatten; end # Return all methods on chassis for all classes. - def methods_on(chassis) - @cache_methods_on ||= { } - @cache_methods_on[chassis] ||= classes.collect { |c| c.methods_on(chassis) }.flatten + def amqp_methods_on(chassis) + @cache_amqp_methods_on ||= { } + @cache_amqp_methods_on[chassis] ||= amqp_classes.collect { |c| c.amqp_methods_on(chassis) }.flatten end # Merge contents of elements. |
