def update(hash = {})
      hash.each do |k,v|
        # The name of the setter for the value of k
        setter = "#{k}="

        # Check if there is a matching setter
        if self.respond_to?(setter)
          # Yes, there is. Call the setter with the value
          self.send(setter, v)
        end
      end

      self
    end
def update(hash = {})
      hash.each do |k,v|
        # The name of the setter for the value of k
        setter = "#{k}="

        # Check if there is a matching setter
        if self.respond_to?(setter)
          # Yes, there is. Call the setter with the value
          self.send(setter, v)
        end
      end

      self
    end
Updates all the instance variables in our local object with
 the values in the hash. This will selectively update only the
 keys in the hash that is passed, and will not update/add non-existant
 attributes