descriptive_statistics 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/descriptive_statistics.rb +2 -9
- data/lib/descriptive_statistics/enumerable_extension.rb +11 -0
- data/lib/descriptive_statistics/mean.rb +1 -3
- data/lib/descriptive_statistics/median.rb +1 -3
- data/lib/descriptive_statistics/number.rb +1 -3
- data/lib/descriptive_statistics/percentile.rb +1 -3
- data/lib/descriptive_statistics/safe.rb +7 -0
- data/lib/descriptive_statistics/standard_deviation.rb +1 -3
- data/lib/descriptive_statistics/sum.rb +1 -3
- data/lib/descriptive_statistics/variance.rb +1 -3
- metadata +5 -2
@@ -1,9 +1,2 @@
|
|
1
|
-
|
2
|
-
require
|
3
|
-
require 'descriptive_statistics/sum.rb'
|
4
|
-
require 'descriptive_statistics/mean.rb'
|
5
|
-
require 'descriptive_statistics/median.rb'
|
6
|
-
require 'descriptive_statistics/variance.rb'
|
7
|
-
require 'descriptive_statistics/standard_deviation.rb'
|
8
|
-
require 'descriptive_statistics/percentile.rb'
|
9
|
-
|
1
|
+
require "descriptive_statistics/safe"
|
2
|
+
require "descriptive_statistics/enumerable_extension"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Enumerable
|
2
|
+
include DescriptiveStatistics
|
3
|
+
|
4
|
+
# This is necessary because otherwise objects which
|
5
|
+
# have already included Enumerable (such as Array) won't
|
6
|
+
# be able to access DescriptiveStatistics's methods.
|
7
|
+
# It is an evil hack though :-/
|
8
|
+
DescriptiveStatistics.instance_methods.each do |m|
|
9
|
+
define_method(m, DescriptiveStatistics.instance_method(m))
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
require 'descriptive_statistics/number.rb'
|
2
|
+
require 'descriptive_statistics/sum.rb'
|
3
|
+
require 'descriptive_statistics/mean.rb'
|
4
|
+
require 'descriptive_statistics/median.rb'
|
5
|
+
require 'descriptive_statistics/variance.rb'
|
6
|
+
require 'descriptive_statistics/standard_deviation.rb'
|
7
|
+
require 'descriptive_statistics/percentile.rb'
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: descriptive_statistics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Derrick Parkhurst
|
9
|
+
- Gregory Brown
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2012-
|
13
|
+
date: 2012-09-18 00:00:00.000000000Z
|
13
14
|
dependencies: []
|
14
15
|
description: Adds descriptive statistics methods to Enumerable for use on collections
|
15
16
|
email: derrick.parkhurst@gmail.com
|
@@ -17,10 +18,12 @@ executables: []
|
|
17
18
|
extensions: []
|
18
19
|
extra_rdoc_files: []
|
19
20
|
files:
|
21
|
+
- lib/descriptive_statistics/enumerable_extension.rb
|
20
22
|
- lib/descriptive_statistics/mean.rb
|
21
23
|
- lib/descriptive_statistics/median.rb
|
22
24
|
- lib/descriptive_statistics/number.rb
|
23
25
|
- lib/descriptive_statistics/percentile.rb
|
26
|
+
- lib/descriptive_statistics/safe.rb
|
24
27
|
- lib/descriptive_statistics/standard_deviation.rb
|
25
28
|
- lib/descriptive_statistics/sum.rb
|
26
29
|
- lib/descriptive_statistics/variance.rb
|