descriptive_statistics 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ module DescriptiveStatistics
2
+ def mode
3
+ self.group_by { |e| e }.values.max_by(&:size).first
4
+ end
5
+ end
@@ -2,6 +2,7 @@ require 'descriptive_statistics/number.rb'
2
2
  require 'descriptive_statistics/sum.rb'
3
3
  require 'descriptive_statistics/mean.rb'
4
4
  require 'descriptive_statistics/median.rb'
5
+ require 'descriptive_statistics/mode.rb'
5
6
  require 'descriptive_statistics/variance.rb'
6
7
  require 'descriptive_statistics/standard_deviation.rb'
7
8
  require 'descriptive_statistics/percentile.rb'
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descriptive_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Derrick Parkhurst
9
9
  - Gregory Brown
10
+ - Daniel Farrell
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2012-09-18 00:00:00.000000000Z
14
+ date: 2012-12-01 00:00:00.000000000 Z
14
15
  dependencies: []
15
16
  description: Adds descriptive statistics methods to Enumerable for use on collections
16
17
  email: derrick.parkhurst@gmail.com
@@ -21,6 +22,7 @@ files:
21
22
  - lib/descriptive_statistics/enumerable_extension.rb
22
23
  - lib/descriptive_statistics/mean.rb
23
24
  - lib/descriptive_statistics/median.rb
25
+ - lib/descriptive_statistics/mode.rb
24
26
  - lib/descriptive_statistics/number.rb
25
27
  - lib/descriptive_statistics/percentile.rb
26
28
  - lib/descriptive_statistics/safe.rb