muflax 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44e24b21ba570502e80c3152ce8fdf76bac79d9010bcdb4dc133ad1bb2e8a91d
4
- data.tar.gz: 1b4ce826d74a6f0519461c619f1e78bd88397441ca585dce2d7e56d63db2a473
3
+ metadata.gz: 2cd61db92719844a3b8930c018086aeabbf5a8241e66f04d4b2a7a4c1b06d4d1
4
+ data.tar.gz: 38949a2f122c6f334fd8f287a223aaf9dd39cba881ec9f84eed8fa8d055b8f9e
5
5
  SHA512:
6
- metadata.gz: 1a901107be6db2922d3a365ea9346a4d1313f08b24ea64ec496d11810760c6ede3c672ded697e58ad6b66d02f9073e0818d1e64e73a2f1cdd117cda8acad14f5
7
- data.tar.gz: aa9923f375c3f90831c84d4580eaf1b4a739a22d07f64ab671cddb0f6cb2b09d3cf55cabbbd760331ace27bb1087446ca3985669e4973e2a98dff249c7ce05ac
6
+ metadata.gz: 0c78d6efafb171b12745f67605b4117b17bce4c27df6a5dbd86a8e0d8e022ea8ef271c69362b11dc81f0a4dd38038409e66c3c45ed857de47b8eeb72d1dc1594
7
+ data.tar.gz: cc3b31baa4d2ab091361acb0674bc39ce7b96e48e81730a92ce32685ce00e541c360df86a884f6e203a080ce59cbc8b5b95667fb903a90894364e9340e68270e
checksums.yaml.gz.sig CHANGED
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- muflax (0.3.9)
4
+ muflax (0.3.10)
5
5
  awesome_print (~> 1)
6
6
  debug_inspector (~> 0.0)
7
7
  highline (~> 1.6)
@@ -50,6 +50,16 @@ module Enumerable
50
50
  def rfind *arg, &block
51
51
  self.reverse.find(*arg, &block)
52
52
  end
53
+
54
+ def to_ratio
55
+ sum = self.sum
56
+ self.map{|n| (n.to_f / sum).round(1)}
57
+ end
58
+
59
+ def to_percent
60
+ sum = self.sum / 100.0
61
+ self.map{|n| (n.to_f / sum).round(1)}
62
+ end
53
63
  end
54
64
 
55
65
  class Object
data/muflax.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "muflax"
3
- s.version = "0.3.9"
3
+ s.version = "0.3.10"
4
4
 
5
5
  s.authors = ["muflax"]
6
6
  s.summary = "muflax standard library"
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muflax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - muflax
@@ -28,7 +28,7 @@ cert_chain:
28
28
  9xjevPGDZ+8y8wc8/mXBPK1pTaBh2oi8947HaTq8EadxezFs2Je+oSnMbygfo/a7
29
29
  0rbAHpJPtzql3a4+gjK54qkJUWSUjWuLMHFIHhMt1laowNJUio6ASGx8tfzgLLnZ
30
30
  -----END CERTIFICATE-----
31
- date: 2018-04-23 00:00:00.000000000 Z
31
+ date: 2018-04-29 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: awesome_print
metadata.gz.sig CHANGED
Binary file