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 | ccacd47fdc47b0bb3b26b87a51c59d88d47e8236 (patch) | |
| tree | e47119a9bf82e0c81b85e3adb0f74a1366586d02 /cpp/bindings/qmf/ruby | |
| parent | 4c9e6b30e9410cb32367be87ca9bbf941df750dc (diff) | |
| download | qpid-python-ccacd47fdc47b0bb3b26b87a51c59d88d47e8236.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/qpid@817314 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qmf/ruby')
| -rw-r--r-- | cpp/bindings/qmf/ruby/qmf.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/cpp/bindings/qmf/ruby/qmf.rb b/cpp/bindings/qmf/ruby/qmf.rb index cba9759135..965858909a 100644 --- a/cpp/bindings/qmf/ruby/qmf.rb +++ b/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 |
