module Qpid::Proton::Util::ClassWrapper

This mixin provides a method for mapping from an underlying Proton C library class to a Ruby class.

@private

Constants

WRAPPERS

Public Instance Methods

class_wrapper(clazz, c_impl) { |c_impl| ... } click to toggle source
# File lib/util/class_wrapper.rb, line 43
def class_wrapper(clazz, c_impl, &block)
  proc_func = WRAPPERS[clazz]
  if !proc_func.nil?
    proc_func.yield(c_impl)
  elsif block_given?
    yield(c_impl)
  end
end