def set_attributes(options)
      options.each_pair do |key, value|
        method = "#{key}="
        unless respond_to?(method)
          raise Errors::InvalidOption.new(key)
        end
        send(method, value)
      end
    end
def set_attributes(options)
      options.each_pair do |key, value|
        method = "#{key}="
        unless respond_to?(method)
          raise Errors::InvalidOption.new(key)
        end
        send(method, value)
      end
    end
Initialize a new Easy.
 It initializes curl, if not already done and applies the provided options.
 Look into {Ethon::Easy::Options Options} to see what you can provide in the
 options hash.

 @example Create a new Easy.
   Easy.new(url: "www.google.de")

 @param [ Hash ] options The options to set.
 @option options :headers [ Hash ] Request headers.

 @return [ Easy ] A new Easy.

 @see Ethon::Easy::Options
 @see http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
 Set given options.

 @example Set options.
   easy.set_attributes(options)

 @param [ Hash ] options The options.

 @raise InvalidOption

 @see initialize