I am thinking about:
```ruby
def summary
  # snip
  format.yml do
    send_data Exporter.new(@deployment).to_hash.to_yaml, :filename => "{@deployment.name}.yaml"
  end
end
```
Exporter will just be responsible for converting deployment to a hash/array data-structure.