lib/faraday/options.rb in faraday-0.9.0.rc3 vs lib/faraday/options.rb in faraday-0.9.0.rc4

- old
+ new

@@ -15,13 +15,11 @@ end # Public def update(obj) obj.each do |key, value| - next unless value - sub_options = self.class.options_for(key) - if sub_options && value + if sub_options = self.class.options_for(key) value = sub_options.from(value) elsif Hash === value hash = {} value.each do |hash_key, hash_value| hash[hash_key] = hash_value @@ -31,9 +29,11 @@ self.send("#{key}=", value) end self end + + alias merge! update # Public def delete(key) value = send(key) send("#{key}=", nil)