Class: GitDiff::StatsCollector::Rollup
- Inherits:
-
Object
- Object
- GitDiff::StatsCollector::Rollup
- Defined in:
- lib/git_diff/stats_collector/rollup.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
Instance Method Summary collapse
- #collect ⇒ Object
-
#initialize(collection) ⇒ Rollup
constructor
A new instance of Rollup.
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
#collection ⇒ Object (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
#collect ⇒ Object
12 13 14 |
# File 'lib/git_diff/stats_collector/rollup.rb', line 12 def collect collection.map(&:stats) end |