Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tdding-patshaughnessys-ask-dont-tell - example-2.rb
def lines_after_word(lines, target)
index = lines.find_index {|line| line =~ /#{target}/ }
index.nil? ? [] : ""
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.