How about:

```ruby
if datalists = resource_descriptor.descriptor_document['datalists']
  datalists.each { |k, v| datalist_registry["#{resource_descriptor.name}\##{k}"] = v }
end
```