Method: Fog::Attributes::InstanceMethods#merge_attributes

Defined in:
lib/fog/core/attributes.rb

#merge_attributes(new_attributes = {}) ⇒ Object


140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/fog/core/attributes.rb', line 140

def merge_attributes(new_attributes = {})
  for key, value in new_attributes
    unless self.class.ignored_attributes.include?(key)
      if aliased_key = self.class.aliases[key]
        send("#{aliased_key}=", value)
      elsif self.respond_to?("#{key}=",true)
        send("#{key}=", value)
      else
        attributes[key] = value
      end
    end
  end
  self
end