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 | d2015d708bdb0c660cddd6969996c23daa6a5c49 (patch) | |
tree | 0b71b1447a45dca0b1e8c7f0f8d3d95d50de0faa /cpp/rubygen/amqpgen.rb | |
parent | 462fd7ae8c6ac92730ebc497a9140ecec0cc03d9 (diff) | |
download | qpid-python-d2015d708bdb0c660cddd6969996c23daa6a5c49.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/qpid@564225 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/rubygen/amqpgen.rb')
-rwxr-xr-x | cpp/rubygen/amqpgen.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cpp/rubygen/amqpgen.rb b/cpp/rubygen/amqpgen.rb index ae8e4c5d1c..49f8c0061e 100755 --- a/cpp/rubygen/amqpgen.rb +++ b/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. |