checkpercentage 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/checkpercentage.rb +1 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21383b5431b4212ff2f889a232962131ba469ca2
4
- data.tar.gz: dc515dbc1ccb8c267bbaa5cb943ca167fd55a43e
3
+ metadata.gz: 4cf4adb9ed193ec37eece03556fa59e0b78e4ee6
4
+ data.tar.gz: 01500860b23a14e539a41da6620c72afb1dbd783
5
5
  SHA512:
6
- metadata.gz: 134fd4cd344294ff4a3317713a4f01f3497616544bdbfe7098042f962328effa64d14c26bb55301c4ee0208dd50eda51d9f1073545bdac52ce3d33182047d7c8
7
- data.tar.gz: 1a98477a38072dbffabc91a37f9d410bfd5b45da14b8d9e0156081fffc734aa61ee5d64d320e035c1ec5ed152b74b8587feb86633b86e7a3873bf65692a00297
6
+ metadata.gz: 42767ced2e6976ec73c4ac706506a34c57437bd0e3d62e997def60ada674380f2cdfc174cc70a0820606100fef553f0a5cd87fbfa3b1a8b3e5d76342495f37db
7
+ data.tar.gz: ea5540f38429ddae6d42a57311e58d54f38f3034b12ce3e8c68641b641a92fa104649b899dc774d4a1db088466a41e5bb237d50901f8dd11fa1e72277ac519f0
@@ -2,7 +2,7 @@ class Checkpercentage
2
2
 
3
3
  #1) what is x% of y?
4
4
  def self.find_amount(rate, base)
5
- result_amount = rate * base/100
5
+ result_amount = (rate.to_f.round(2) * base.to_f.round(2)/100).ceil
6
6
  return result_amount
7
7
  end
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkpercentage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Zacchi