qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kgiu...@apache.org
Subject svn commit: r940611 - /qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb
Date Mon, 03 May 2010 20:43:16 GMT
Author: kgiusti
Date: Mon May  3 20:43:15 2010
New Revision: 940611

URL: http://svn.apache.org/viewvc?rev=940611&view=rev
Log:
QMF: add attribute read access to ConnectionSettings ruby class

Modified:
    qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb

Modified: qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb?rev=940611&r1=940610&r2=940611&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf/ruby/qmf.rb Mon May  3 20:43:15 2010
@@ -189,15 +189,29 @@ module Qmf
       raise "Invalid attribute '#{key}'" unless good
     end
 
+    def get_attr(key)
+      _v = @impl.getAttr(key)
+      if _v.isString()
+        return _v.asString()
+      elsif _v.isUint()
+        return _v.asUint()
+      elsif _v.isBool()
+        return _v.asBool()
+      else
+          raise Exception("Argument error: value for attribute '#{key}' has unsupported type:
#{_v.getType()}")
+      end
+    end
+
+
     def method_missing(name_in, *args)
       name = name_in.to_s
       if name[name.length - 1] == 61
         attr = name[0..name.length - 2]
         set_attr(attr, args[0])
         return
+      else
+        return get_attr(name)
       end
-
-      super.method_missing(name_in, args)
     end
   end
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message