One liner is kind of ugly, why not:

```ruby
if image = find_image_with_regex(options[:src])
  locator.concat("[@src='#{image}']")
else
  false
end
```