Why not just this?

```erb
<%= %Q{#{directive}="#{value}"} %>
```