summaryrefslogtreecommitdiff
path: root/cpp/rubygen/amqpgen.rb
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-08-09 00:03:43 +0000
committerAlan Conway <aconway@apache.org>2007-08-09 00:03:43 +0000
commitba57e373864d44cfae17ec8c2c9de7a55f0b4113 (patch)
treebb16616df6e2a48b9cf164a52ca30fa99f90e1fd /cpp/rubygen/amqpgen.rb
parentb3eb629f662dc2df11ce3981a7c4cc8ab58a8c28 (diff)
downloadqpid-python-ba57e373864d44cfae17ec8c2c9de7a55f0b4113.tar.gz
Moved Proxy generation to rubygen.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@564051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/rubygen/amqpgen.rb')
-rwxr-xr-xcpp/rubygen/amqpgen.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/rubygen/amqpgen.rb b/cpp/rubygen/amqpgen.rb
index 31f7544011..ae8e4c5d1c 100755
--- a/cpp/rubygen/amqpgen.rb
+++ b/cpp/rubygen/amqpgen.rb
@@ -114,7 +114,8 @@ class AmqpClass < AmqpElement
# chassis should be "client" or "server"
def methods_on(chassis)
- elements.collect("method/chassis[@name='#{chassis}']/..") { |m|
+ @cache_methods_on ||= { }
+ @cache_methods_on[chassis] ||= elements.collect("method/chassis[@name='#{chassis}']/..") { |m|
AmqpMethod.new(m,self)
}.sort_by_name
end
@@ -147,7 +148,8 @@ class AmqpRoot < AmqpElement
# Return all methods on chassis for all classes.
def methods_on(chassis)
- classes.collect { |c| c.methods_on(chassis) }.flatten
+ @cache_methods_on ||= { }
+ @cache_methods_on[chassis] ||= classes.collect { |c| c.methods_on(chassis) }.flatten
end
# Merge contents of elements.