Seems you could make this a little more SRP, self-documenting by defining a few methods like:

```ruby
if descriptors.is_a?(Hash)
  resolve_hash_descriptors(...)
else
  resolve_href_descriptors(...)
end
```
Or whatever are the best names.