You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: options.rb
    path of file: ./repos/faraday/lib/faraday
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Faraday
  # S
    
    def update(obj)
      obj.each do |key, value|
        sub_options = self.class.options_for(key)
        if sub_options
          new_value = sub_options.from(value) if value
        elsif value.is_a?(Hash)
          new_value = value.dup
        else
          new_value = value
        end

        send(:"#{key}=", new_value) unless new_value.nil?
      end