I think I would write this as:

```ruby
resource_descriptor = add_resource_descriptor_to_registry(hash_descriptor, @raw_descriptor_registry ||= {})) 
add_resource_descriptor_to_raw_profile_registry(resource_descriptor)
```