def update_properties(hash)
      hash.each do |key, value|
        setter_method = "#{key}="
        if respond_to?(setter_method)
          send(setter_method, value)
        end
      end
    end
def update_properties(hash)
      hash.each do |key, value|
        setter_method = "#{key}="
        if respond_to?(setter_method)
          send(setter_method, value)
        end
      end
    end
Updates properties of Entity with the values from hash