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/c0d13cb6 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/c0d13cb6 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/c0d13cb6 Branch: refs/heads/ruby-engine-apis Commit: c0d13cb68030618f72860f598e356e8f9e9029e4 Parents: eeef257 Author: Darryl L. Pierce <mcpie...@gmail.com> Authored: Mon Feb 16 15:33:30 2015 -0500 Committer: Darryl L. Pierce <mcpie...@gmail.com> Committed: Thu May 14 15:17:31 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/c0d13cb6/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/c0d13cb6/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: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org