diff options
author | Ted Ross <tross@apache.org> | 2009-01-16 21:00:25 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2009-01-16 21:00:25 +0000 |
commit | 06bbe3a94cf4a6a8ed0626f00d96249a6a67ae98 (patch) | |
tree | 3f0d9fcd718d0cad3d30dd07d38cceb5d5483948 | |
parent | 556fc3c27f710ea30e6047e24d229a1efaa8008e (diff) | |
download | qpid-python-06bbe3a94cf4a6a8ed0626f00d96249a6a67ae98.tar.gz |
QPID-1541 - Applied Ian's patch
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@735127 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/ruby/lib/qpid/qmf.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qpid/ruby/lib/qpid/qmf.rb b/qpid/ruby/lib/qpid/qmf.rb index 832c042b26..0309b65a6c 100644 --- a/qpid/ruby/lib/qpid/qmf.rb +++ b/qpid/ruby/lib/qpid/qmf.rb @@ -390,6 +390,18 @@ module Qpid::Qmf @result end + # Return one and only one object or nil. + def object(kwargs) + objs = objects(kwargs) + return objs.length == 1 ? objs[0] : nil + end + + # Return the first of potentially many objects. + def first_object(kwargs) + objs = objects(kwargs) + return objs.length > 0 ? objs[0] : nil + end + def set_event_filter(kwargs); end def handle_broker_connect(broker); end |