lib/hashme/properties.rb in hashme-0.2.4 vs lib/hashme/properties.rb in hashme-0.2.5

- old
+ new

@@ -12,10 +12,15 @@ end def set_attribute(name, value) property = get_property(name) if property - self[property.name] = property.build(self, value) + value = property.build(self, value) + if value.nil? + delete(property.name) + else + self[property.name] = value + end end end def attributes=(attrs = {}) set_attributes(attrs)