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 | 2361ff020da1440a249b5ee611ff6b799ecbea71 (patch) | |
| tree | 8c1934b7bfdbfe4f6e8339fd835f2b76164d2f40 | |
| parent | 7681eec0acca2aa7898ee1e9abaae81cbfc04b2f (diff) | |
| download | qpid-python-2361ff020da1440a249b5ee611ff6b799ecbea71.tar.gz | |
QPID-1541 - Applied Ian's patch
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@735127 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | ruby/lib/qpid/qmf.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ruby/lib/qpid/qmf.rb b/ruby/lib/qpid/qmf.rb index 832c042b26..0309b65a6c 100644 --- a/ruby/lib/qpid/qmf.rb +++ b/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 |
