def consumer(cons, *init_args, &block)
      if cons.instance_of? Class
        cons = cons.new(*init_args)
      end
      ch = ConsumerHelper.new(cons, credential)
      ch.instance_eval &block
      provider.add_consumer(ch.consumer)
    end
def consumer(cons, *init_args, &block)
      if cons.instance_of? Class
        cons = cons.new(*init_args)
      end
      ch = ConsumerHelper.new(cons, credential)
      ch.instance_eval &block
      provider.add_consumer(ch.consumer)
    end
Adds a consumer.

 * If an instance of Consumer or its subclasses is given, it is used.
 * If Class is given, initialize its instance, and use it. In this case, the rest arguments are passed to the constructor of the given class.