checkpercentage 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 56a18699a6d49a62ca18953b6b02c23826fff5fc
4
- data.tar.gz: 7c152e9bba589985ee7ce4bdad03cf24c404c051
3
+ metadata.gz: 5bf647d8acfaafc10105730ddb139d3c88230a92
4
+ data.tar.gz: 21d9d050578de63f7385a071ff456849ac2e6c0c
5
5
  SHA512:
6
- metadata.gz: 785b99a1c5ea29b61c3008b3c05b86991f789f2c35645969c0ac1fb823d75ce85fac92a5ddd8c21e3c810bb9fbb9e247aac4fee9264ef4471b574078b336aa87
7
- data.tar.gz: 0074802ccc3453f3f672c70627ceb2a8d6d6aca4c16e212859e4538030078ed5547f7448ac568e9834c168118d02d237f863f9ffae11f9534b5dd926e953e6cc
6
+ metadata.gz: e8920401be775f49407bd22d292a3e2cef9da0633230b17da5189e3fb9d30355b61cea343110d9097d21c04041e0cc1f897fd3b6dcd6a8d0cdce2740eb345979
7
+ data.tar.gz: 8ac56af17c24e370c1c161af8341375294c985caa0686caa6c8baf445c17f3a5ca27d7912ce6c4a5da4f73cde772192a4b046495484064f7b59970058d115804
@@ -0,0 +1,18 @@
1
+ class Checkpercentage
2
+
3
+ #1) what is x% of y?
4
+ def findAmount(rate, base)
5
+ rate * base/100
6
+ end
7
+
8
+ #2) x is what percentage of y?
9
+ def findPercent(amount, base)
10
+ amount/base * 100
11
+ end
12
+
13
+ #3) x is y% of what number?
14
+ def findBase(amount, rate)
15
+ amount/rate * 100
16
+ end
17
+
18
+ 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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Zacchi
@@ -16,7 +16,7 @@ executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
- - lib/checksomething.rb
19
+ - spec/lib/checksomething.rb
20
20
  homepage: http://rubygems.org/gems/checkpercentage
21
21
  licenses: []
22
22
  metadata: {}
@@ -1,20 +0,0 @@
1
- class Checkpercentage
2
-
3
- #1) what is x% of y?
4
- def self.findAmount(rate, base)
5
- resultAmount = rate * base/100
6
- return resultAmount
7
- end
8
-
9
- #2) x is what percentage of y?
10
- def self.findPercent(amount, base )
11
- resultPercent = amount/base * 100
12
- return resultPercent
13
- end
14
-
15
- #3) x is y% of what number?
16
- def self.findBase(amount, rate)
17
- resultBase amount/rate *100
18
- end
19
-
20
- end # End Module