you can write it with reduce method
```
slp = attr.reduce([service]) { |res, pair| res << "#{pair[0].downcase}=#{v}"}
```