frequency_analyser 1.2.4 → 1.3.0

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.
@@ -11,6 +11,7 @@ class FrequencyAnalyser::Modifier < Struct.new(:aggregation)
11
11
  when :percentage
12
12
  percentage
13
13
  else
14
+ warn_unrecognised(mode) if mode
14
15
  aggregation
15
16
  end
16
17
  end
@@ -32,4 +33,9 @@ class FrequencyAnalyser::Modifier < Struct.new(:aggregation)
32
33
  @sum ||= aggregation.values.inject(:+)
33
34
  end
34
35
 
36
+ def warn_unrecognised(mode)
37
+ print "Warning: '#{mode}' is not a recognised mode."
38
+ puts " (#{__FILE__}:#{__LINE__})"
39
+ end
40
+
35
41
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frequency_analyser
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 2
9
- - 4
10
- version: 1.2.4
8
+ - 3
9
+ - 0
10
+ version: 1.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Christopher Patuzzo