Class: Bmg::Summarizer::Count
- Inherits:
-
Bmg::Summarizer
- Object
- Bmg::Summarizer
- Bmg::Summarizer::Count
- Defined in:
- lib/bmg/summarizer/count.rb
Overview
Count summarizer.
Example:
# direct ruby usage
Bmg::Summarizer.count.summarize(...)
Instance Attribute Summary
Attributes inherited from Bmg::Summarizer
Instance Method Summary collapse
-
#happens(memo, tuple) ⇒ Object
Counts one more as new memo.
-
#least ⇒ Object
Returns 0 as least value.
Methods inherited from Bmg::Summarizer
avg, bucketize, by_proc, collect, concat, count, distinct, distinct_count, #finalize, first, #initialize, last, max, median, median_cont, median_disc, min, multiple, percentile, percentile_cont, percentile_disc, stddev, sum, summarization, #summarize, #to_summarizer_name, value_by, variance
Constructor Details
This class inherits a constructor from Bmg::Summarizer
Instance Method Details
#happens(memo, tuple) ⇒ Object
Counts one more as new memo
19 20 21 |
# File 'lib/bmg/summarizer/count.rb', line 19 def happens(memo, tuple) memo + 1 end |
#least ⇒ Object
Returns 0 as least value.
14 15 16 |
# File 'lib/bmg/summarizer/count.rb', line 14 def least() 0 end |