descriptive_statistics 2.4.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e28f48a7fc39460fc375049b65f79956f52cec0b
4
- data.tar.gz: 71570533e928cc63aaab9afbf7b16d02930b13d0
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OWY4YTM5Y2MxOTc3Mzc5MWYzNzk1NjRmZjVlYzljYjY1MDQwYWIwMg==
5
+ data.tar.gz: !binary |-
6
+ ZTA4MTc2MmY4NjMzM2EzOTJmYTkyYTJjODk0NGE5MjM5NjU0OWMwNA==
5
7
  SHA512:
6
- metadata.gz: 4c95bbdcfc03c5a90a70a0b165a38cc12f42601c6a4b4202ade3adf5793e87359a7f1acc975c7c89d4bbec9076b860cff29fa1f7d10eac2ca930c23eb4895205
7
- data.tar.gz: 0c4f66b5cb53468b89f0d6d88c7214ce4f295adf0f4dd3d9cc96f0ccc583df684a1f1b84b476992c3dd6a88bcf0b4ff580f738bbbdd286ff9bc1e68bf5c81bce
8
+ metadata.gz: !binary |-
9
+ ODE0YmJlMWIwZTRkN2FhODU2MGU4MzZmMTJlMTBlNWJkNjE3MmIzNDlhZDIx
10
+ NDc2ZTRmMzNiYzU1OGEyNWFjZmE2MmJkNjNhMjUxYzdkOGRkNTc0YmQxZjky
11
+ OTE0ZTc1OGQwOTlmYWFlNGNmZmJhMmNmMGIxY2YxZTBlYTg4MTA=
12
+ data.tar.gz: !binary |-
13
+ NDNjZTg1OTQ4ZjJkMWQxNWU2ZGUwOThmZjM0MDdiMGI2MmM1NTg0OWZjMjNj
14
+ ZGVkNTBmYWIwN2M2NDZmYTI5MGNhYjBiODIwMzQ2ZGY2MTczZjE3MDQxNjQ3
15
+ YjY2ODIwNjUwMmRhZGUwMDZlZDA1YjVkYWViNjMxMWVmNDgyZGU=
@@ -1,11 +1,9 @@
1
1
  module Enumerable
2
2
  include DescriptiveStatistics
3
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))
4
+ DescriptiveStatistics.instance_methods.each do |name|
5
+ method = DescriptiveStatistics.instance_method(name)
6
+ define_method(name, method)
10
7
  end
8
+
11
9
  end
@@ -0,0 +1,33 @@
1
+ require "descriptive_statistics/safe"
2
+
3
+ module DescriptiveStatistics
4
+
5
+ module Refinement
6
+
7
+ def self.new(*klasses)
8
+ refinement_module = Module.new
9
+
10
+ klasses.each do |klass|
11
+
12
+ refinement_module.instance_eval do
13
+
14
+ refine klass do
15
+
16
+ DescriptiveStatistics.instance_methods.each do |name|
17
+ method = DescriptiveStatistics.instance_method(name)
18
+ define_method(name, method)
19
+ end
20
+
21
+ end
22
+
23
+ end
24
+
25
+ end
26
+
27
+ return refinement_module
28
+
29
+ end
30
+
31
+ end
32
+
33
+ end
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: 2.4.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derrick Parkhurst
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2014-11-15 00:00:00.000000000 Z
16
+ date: 2014-12-19 00:00:00.000000000 Z
17
17
  dependencies: []
18
18
  description: Adds descriptive statistics methods to Enumerable module for use on collections
19
19
  or Numeric data
@@ -33,6 +33,7 @@ files:
33
33
  - lib/descriptive_statistics/percentile.rb
34
34
  - lib/descriptive_statistics/percentile_rank.rb
35
35
  - lib/descriptive_statistics/range.rb
36
+ - lib/descriptive_statistics/refinement.rb
36
37
  - lib/descriptive_statistics/safe.rb
37
38
  - lib/descriptive_statistics/standard_deviation.rb
38
39
  - lib/descriptive_statistics/stats.rb
@@ -49,12 +50,12 @@ require_paths:
49
50
  - lib
50
51
  required_ruby_version: !ruby/object:Gem::Requirement
51
52
  requirements:
52
- - - ">="
53
+ - - ! '>='
53
54
  - !ruby/object:Gem::Version
54
55
  version: '0'
55
56
  required_rubygems_version: !ruby/object:Gem::Requirement
56
57
  requirements:
57
- - - ">="
58
+ - - ! '>='
58
59
  - !ruby/object:Gem::Version
59
60
  version: '0'
60
61
  requirements: []