to_histogram 1.0.14 → 1.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stdout_print.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8e294f1f6f40a95f9222824e814746354411458
|
4
|
+
data.tar.gz: 93649a49d4317c8871e2c576e3dc718753b63405
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7cbb0fd3f00d822757cdedcab9e72beab79b200d3f4bb776bd3891f319625af836e193ffa683af0baef788869b5e15ad8e02f7350b8805dd4fcbf4f6be13fc2
|
7
|
+
data.tar.gz: 305f250ac56e02b790d03683cc240474d18ec1106274403f44be1be6272b8eafda703c6a8327b20d3c3e75dd00cbae2e636feeef94a5ae029a5d15888207eae3
|
data/lib/stdout_print.rb
CHANGED
@@ -53,7 +53,8 @@ module ToHistogram
|
|
53
53
|
frequency = b.contents.length
|
54
54
|
percentage = ((frequency.to_f / @histogram.bucket_contents_length) * 100)
|
55
55
|
stars = ''
|
56
|
-
|
56
|
+
|
57
|
+
percentage.ceil.times { |x| stars << '*' }
|
57
58
|
|
58
59
|
if(i == (@histogram.length - 1))
|
59
60
|
if(b.contents[-1] - b.contents[0] != 0 && (b.contents[-1] - b.contents[0] > @histogram.bucket_width))
|