def add_provider(provider, *args)
      unless provider.respond_to?(:instance_methods) && provider.instance_methods.include?(:lookup)
        raise ArgumentError, "the given provider does not respond to lookup"
      end

      @provider << provider.new(*args)
    end
def add_provider(provider, *args)
      unless provider.respond_to?(:instance_methods) && provider.instance_methods.include?(:lookup)
        raise ArgumentError, "the given provider does not respond to lookup"
      end

      @provider << provider.new(*args)
    end
Adds a provider to the chain. Providers are tried in the order
 they are added, so the order is important.

 @param provider [#lookup]
 @param *args the arguments passed to the providers constructor
 @raise [ArgumentError] if an invalid provider is given
 @return [void]