How about:

```ruby
doc = Crichton.descriptor_registry[key].parent_descriptor.send(methodname)
File.open(File.join(directory, "#{key}_profile.#{ext}"), 'w') { |f| f.write(doc) }
```