checkpercentage 0.1.2 → 0.1.3

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/spec/lib/checksomething.rb +9 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5bf647d8acfaafc10105730ddb139d3c88230a92
4
- data.tar.gz: 21d9d050578de63f7385a071ff456849ac2e6c0c
3
+ metadata.gz: 268c1c3653bf454e1921772f6d1d1905af81b3fc
4
+ data.tar.gz: 7c772fe0f7b72b84e2b5c71fe2ca176548033d1d
5
5
  SHA512:
6
- metadata.gz: e8920401be775f49407bd22d292a3e2cef9da0633230b17da5189e3fb9d30355b61cea343110d9097d21c04041e0cc1f897fd3b6dcd6a8d0cdce2740eb345979
7
- data.tar.gz: 8ac56af17c24e370c1c161af8341375294c985caa0686caa6c8baf445c17f3a5ca27d7912ce6c4a5da4f73cde772192a4b046495484064f7b59970058d115804
6
+ metadata.gz: 7f3f380927487d8bb25184ad40fba93a61d0cc9d7f9ed45603fa9729399b3bf3d3896685142fbb4f61d76448fbe3e3fdfef0129a1fb6d09c8637d453e79551ce
7
+ data.tar.gz: 3ab13c5d085ea4eea1b44f3b2ab7571c3ab94e87ca8425d457ca071fae95dfb2ba4072a64df11e6106df6d5f1885383fd11e841a3ec2334ad5077100d48b1e75
@@ -1,18 +1,21 @@
1
1
  class Checkpercentage
2
2
 
3
3
  #1) what is x% of y?
4
- def findAmount(rate, base)
5
- rate * base/100
4
+ def self.find_amount(rate, base)
5
+ result_amount = rate * base/100
6
+ return result_amount
6
7
  end
7
8
 
8
9
  #2) x is what percentage of y?
9
- def findPercent(amount, base)
10
- amount/base * 100
10
+ def self.find_percent(amount, base)
11
+ result_percent = amount/base * 100
12
+ return result_percent
11
13
  end
12
14
 
13
15
  #3) x is y% of what number?
14
- def findBase(amount, rate)
15
- amount/rate * 100
16
+ def self.find_base(amount, rate)
17
+ result_base = amount/rate * 100
18
+ return result_base
16
19
  end
17
20
 
18
21
  end # End Module
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.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Zacchi