def from_hash(o)
@name = o[NAME] if o.has_key?(NAME)
@description = o[DESCRIPTION] if o.has_key?(DESCRIPTION)
@long_description = o[LONG_DESCRIPTION] if o.has_key?(LONG_DESCRIPTION)
@maintainer = o[MAINTAINER] if o.has_key?(MAINTAINER)
@maintainer_email = o[MAINTAINER_EMAIL] if o.has_key?(MAINTAINER_EMAIL)
@license = o[LICENSE] if o.has_key?(LICENSE)
@platforms = o[PLATFORMS] if o.has_key?(PLATFORMS)
@dependencies = handle_deprecated_constraints(o[DEPENDENCIES]) if o.has_key?(DEPENDENCIES)
@recommendations = handle_deprecated_constraints(o[RECOMMENDATIONS]) if o.has_key?(RECOMMENDATIONS)
@suggestions = handle_deprecated_constraints(o[SUGGESTIONS]) if o.has_key?(SUGGESTIONS)
@conflicting = handle_deprecated_constraints(o[CONFLICTING]) if o.has_key?(CONFLICTING)
@providing = o[PROVIDING] if o.has_key?(PROVIDING)
@replacing = handle_deprecated_constraints(o[REPLACING]) if o.has_key?(REPLACING)
@attributes = o[ATTRIBUTES] if o.has_key?(ATTRIBUTES)
@groupings = o[GROUPINGS] if o.has_key?(GROUPINGS)
@recipes = o[RECIPES] if o.has_key?(RECIPES)
@version = o[VERSION] if o.has_key?(VERSION)
self
end