descriptive-statistics 1.3.3 → 1.3.4
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.
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'forwardable'
|
2
2
|
require "descriptive-statistics/version"
|
3
|
-
require 'descriptive-statistics/all'
|
3
|
+
require 'descriptive-statistics/all-methods'
|
4
4
|
|
5
5
|
class DescriptiveStatistics
|
6
6
|
extend Forwardable
|
7
|
-
include DescriptiveStatistics::
|
7
|
+
include DescriptiveStatistics::AllMethods
|
8
8
|
|
9
9
|
def initialize(data)
|
10
10
|
@data = data
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe DescriptiveStatistics::
|
3
|
+
describe DescriptiveStatistics::AllMethods do
|
4
4
|
it 'should include all stats modules' do
|
5
5
|
[DescriptiveStatistics::Spread, DescriptiveStatistics::Shape, DescriptiveStatistics::Dispersion,
|
6
6
|
DescriptiveStatistics::CentralTendency].each do |ancestor_module|
|
7
|
-
DescriptiveStatistics::
|
7
|
+
DescriptiveStatistics::AllMethods.ancestors.should include(ancestor_module)
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -3,11 +3,11 @@ require 'spec_helper'
|
|
3
3
|
describe DescriptiveStatistics do
|
4
4
|
it 'should allow hacky monkey patches to add methods to structures like arrays' do
|
5
5
|
module Enumerable
|
6
|
-
include DescriptiveStatistics::
|
6
|
+
include DescriptiveStatistics::AllMethods
|
7
7
|
|
8
8
|
# Warning: hacky evil meta programming. Required to have classes that include array get the methods too.
|
9
|
-
DescriptiveStatistics::
|
10
|
-
define_method(m, DescriptiveStatistics::
|
9
|
+
DescriptiveStatistics::AllMethods.instance_methods.each do |m|
|
10
|
+
define_method(m, DescriptiveStatistics::AllMethods.instance_method(m))
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: descriptive-statistics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -58,13 +58,13 @@ files:
|
|
58
58
|
- Rakefile
|
59
59
|
- descriptive-statistics.gemspec
|
60
60
|
- lib/descriptive-statistics.rb
|
61
|
-
- lib/descriptive-statistics/all.rb
|
61
|
+
- lib/descriptive-statistics/all-methods.rb
|
62
62
|
- lib/descriptive-statistics/central-tendency.rb
|
63
63
|
- lib/descriptive-statistics/dispersion.rb
|
64
64
|
- lib/descriptive-statistics/shape.rb
|
65
65
|
- lib/descriptive-statistics/spread.rb
|
66
66
|
- lib/descriptive-statistics/version.rb
|
67
|
-
- spec/lib/descriptive-statistics/
|
67
|
+
- spec/lib/descriptive-statistics/all_methods_spec.rb
|
68
68
|
- spec/lib/descriptive-statistics/central_tendency_spec.rb
|
69
69
|
- spec/lib/descriptive-statistics/dispersion_spec.rb
|
70
70
|
- spec/lib/descriptive-statistics/shape_spec.rb
|
@@ -85,7 +85,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
85
85
|
version: '0'
|
86
86
|
segments:
|
87
87
|
- 0
|
88
|
-
hash:
|
88
|
+
hash: -3732408609999569798
|
89
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
90
|
none: false
|
91
91
|
requirements:
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
segments:
|
96
96
|
- 0
|
97
|
-
hash:
|
97
|
+
hash: -3732408609999569798
|
98
98
|
requirements: []
|
99
99
|
rubyforge_project:
|
100
100
|
rubygems_version: 1.8.24
|
@@ -104,7 +104,7 @@ summary: Simply calculate descriptive statistics such as measures of central ten
|
|
104
104
|
(e.g. mean,median, mode), dispersion (e.g. range and quartiles), and spread (e.g
|
105
105
|
variance and standard deviation)
|
106
106
|
test_files:
|
107
|
-
- spec/lib/descriptive-statistics/
|
107
|
+
- spec/lib/descriptive-statistics/all_methods_spec.rb
|
108
108
|
- spec/lib/descriptive-statistics/central_tendency_spec.rb
|
109
109
|
- spec/lib/descriptive-statistics/dispersion_spec.rb
|
110
110
|
- spec/lib/descriptive-statistics/shape_spec.rb
|