For blocks that span more than one line, it's convention to use `do/end`. This could be refactored as follows:

```ruby
lines.split(/\n/).grep(/,#{@resource[:name]}$/).map do |s|
  s.split(/,/)[0].strip
end
```