diff options
| author | Ted Ross <tross@apache.org> | 2009-09-21 16:42:19 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2009-09-21 16:42:19 +0000 |
| commit | 7c889a8393dd83381bbd32d0f37aed8826eb47d3 (patch) | |
| tree | f0d67fafecf287a9706ea262cbe8cdda3ff66906 /qpid/cpp/bindings/qmf/ruby | |
| parent | ffe7d369e3a2c2304743b6a54ff3d4fb6f95a056 (diff) | |
| download | qpid-python-7c889a8393dd83381bbd32d0f37aed8826eb47d3.tar.gz | |
Fixed a Ruby convention problem (camel-case vs. underscores)
Added method_missing function for Arguments for direct access to method output args.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@817314 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/bindings/qmf/ruby')
| -rw-r--r-- | qpid/cpp/bindings/qmf/ruby/qmf.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/qpid/cpp/bindings/qmf/ruby/qmf.rb b/qpid/cpp/bindings/qmf/ruby/qmf.rb index cba9759135..965858909a 100644 --- a/qpid/cpp/bindings/qmf/ruby/qmf.rb +++ b/qpid/cpp/bindings/qmf/ruby/qmf.rb @@ -405,11 +405,11 @@ module Qmf raise "No linkage to broker" unless @broker newer = @broker.console.get_objects(Query.new(:object_id => object_id)) raise "Expected exactly one update for this object" unless newer.size == 1 - mergeUpdate(newer[0]) + merge_update(newer[0]) end - def mergeUpdate(newObject) - @impl.merge(newObject.impl) + def merge_update(new_object) + @impl.merge(new_object.impl) end def deleted?() @@ -470,6 +470,14 @@ module Qmf @by_hash.each { |k, v| yield(k, v) } end + def method_missing(name, *args) + if @by_hash.include?(name.to_s) + return @by_hash[name.to_s] + end + + super.method_missing(name, args) + end + def by_key(key) val = @map.byKey(key) case val.getType |
