The tempfile name actually doesn't matter, but if you did want to vary it, you could do 
```
filename = "/tmp/#{type}.json"
```