summaryrefslogtreecommitdiff
path: root/qpid/cpp/bindings/qmf2/ruby/qmf2.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/bindings/qmf2/ruby/qmf2.rb')
-rw-r--r--qpid/cpp/bindings/qmf2/ruby/qmf2.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/qpid/cpp/bindings/qmf2/ruby/qmf2.rb b/qpid/cpp/bindings/qmf2/ruby/qmf2.rb
index 6c6dbf357d..65cc695c45 100644
--- a/qpid/cpp/bindings/qmf2/ruby/qmf2.rb
+++ b/qpid/cpp/bindings/qmf2/ruby/qmf2.rb
@@ -233,8 +233,10 @@ module Qmf2
class Query
attr_reader :impl
- def initialize
- @impl = nil
+ def initialize(arg1, arg2=nil, arg3=nil)
+ if arg1.class == Qmf2::DataAddr
+ @impl = Cqmf2::Query.new(arg1.impl)
+ end
end
end
@@ -390,8 +392,12 @@ module Qmf2
class DataAddr
attr_reader :impl
- def initialize(impl)
- @impl = impl
+ def initialize(arg)
+ if arg.class == Hash
+ @impl = Cqmf2::DataAddr.new(arg)
+ else
+ @impl = arg
+ end
end
def ==(other)