class Object
Public Instance Methods
fold_reducer(regex)
click to toggle source
# File lib/util.rb, line 1 def fold_reducer(regex) lambda do |acc, line| if line.match(regex) acc << [line] else acc.last << line end acc end end