PROTON-799: Added the Condition class to the Ruby engine APIs.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/26818752 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/26818752 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/26818752 Branch: refs/heads/ruby-engine-apis Commit: 26818752ad3f487a03e7127e33d7a4db218d5abe Parents: 82d5edf Author: Darryl L. Pierce <[email protected]> Authored: Mon Feb 16 15:33:30 2015 -0500 Committer: Darryl L. Pierce <[email protected]> Committed: Mon May 18 08:10:20 2015 -0400 ---------------------------------------------------------------------- proton-c/bindings/ruby/lib/qpid_proton.rb | 1 + proton-c/bindings/ruby/lib/util/condition.rb | 45 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/26818752/proton-c/bindings/ruby/lib/qpid_proton.rb ---------------------------------------------------------------------- diff --git a/proton-c/bindings/ruby/lib/qpid_proton.rb b/proton-c/bindings/ruby/lib/qpid_proton.rb index 80565dd..99d9dfc 100644 --- a/proton-c/bindings/ruby/lib/qpid_proton.rb +++ b/proton-c/bindings/ruby/lib/qpid_proton.rb @@ -34,6 +34,7 @@ require "util/version" require "util/error_handler" require "util/constants" require "util/swig_helper" +require "util/condition" require "util/engine" require "util/uuid" http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/26818752/proton-c/bindings/ruby/lib/util/condition.rb ---------------------------------------------------------------------- diff --git a/proton-c/bindings/ruby/lib/util/condition.rb b/proton-c/bindings/ruby/lib/util/condition.rb new file mode 100644 index 0000000..b8fd94b --- /dev/null +++ b/proton-c/bindings/ruby/lib/util/condition.rb @@ -0,0 +1,45 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +module Qpid::Proton::Util + + class Condition + + def initialize(name, description = nil, info = nil) + @name = name + @description = description + @info = info + end + + # @private + def to_s + "Condition(#{@name}, #{@description}, #{@info})" + end + + # @private + def ==(other) + ((other.class = self.class) && + (other.name == self.name) && + (other.description == self.description) && + (other.info == self.info)) + end + + end + +end --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
