Top Level Namespace

Includes:
Amatch

Defined Under Namespace

Modules: Cache, CommitStats, FileHelper, Line, Store Classes: AirbrakeClient, CSyntaxTracer, CodeClimateClient, Commit, CovhuraClient, Diff, ErrorClient, FileDiff, FileManager, GitClient, JiraClient, LineTracker, Loggr, Notifier, ProjectCache, PythonTracer, RiskAnalyzer, RollbarClient, RubyTracer, SecureFileStore, SourceTree, StackTracer, Tracer, VirtualBlob, VirtualFile, VirtualFileSystem, VirtualFunction, VirtualTree

Instance Method Summary collapse

Instance Method Details

#fold_reducer(regex) ⇒ Object



1
2
3
4
5
6
7
8
9
10
# 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