Class: GitDiff::StatsCollector::Rollup

Inherits:
Object
  • Object
show all
Defined in:
lib/git_diff/stats_collector/rollup.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(collection) ⇒ Rollup

Returns a new instance of Rollup.



8
9
10
# File 'lib/git_diff/stats_collector/rollup.rb', line 8

def initialize(collection)
  @collection = collection
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



6
7
8
# File 'lib/git_diff/stats_collector/rollup.rb', line 6

def collection
  @collection
end

Instance Method Details

#collectObject



12
13
14
# File 'lib/git_diff/stats_collector/rollup.rb', line 12

def collect
  collection.map(&:stats)
end