Class: FrequencyAnalyser::Aggregation
- Inherits:
-
Hash
- Object
- Hash
- FrequencyAnalyser::Aggregation
- Defined in:
- lib/frequency_analyser/aggregation.rb
Instance Method Summary collapse
- #<<(other) ⇒ Object
-
#initialize ⇒ Aggregation
constructor
A new instance of Aggregation.
Constructor Details
#initialize ⇒ Aggregation
Returns a new instance of Aggregation.
3 4 5 |
# File 'lib/frequency_analyser/aggregation.rb', line 3 def initialize self.default = 0 end |
Instance Method Details
#<<(other) ⇒ Object
7 8 9 10 11 |
# File 'lib/frequency_analyser/aggregation.rb', line 7 def <<(other) other.each do |key, value| self[key] += value end end |