checkpercentage 0.1.0

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 +7 -0
  2. data/lib/checksomething.rb +20 -0
  3. metadata +43 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8052d4f00caf6816f4fb48c5f2637a2163a62e6c
4
+ data.tar.gz: aa7774591cc9e74a30b9967279219ae3467bf14f
5
+ SHA512:
6
+ metadata.gz: d9bca945599e38054165035f644c72fd5e0b9c1f46f42d134243d4f453a2e734b534eed45a647a8e0a438ddd0a31bfbddd1b306f1e634603dc3f477db857582b
7
+ data.tar.gz: 423cfb0d0395f4f091b91af9d61d6bed737180d2757bb1b28772d5e5db60a0d48130cd15275e740ab0bc01a5c9d0b9161d11dd28b03e12e5fb6c1936eb4eb47d
@@ -0,0 +1,20 @@
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
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: checkpercentage
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Victor Zacchi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-17 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple gem
14
+ email: victor.zacchi@student.ncirl.ie
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/checksomething.rb
20
+ homepage: http://rubygems.org/gems/checkpercentage
21
+ licenses: []
22
+ metadata: {}
23
+ post_install_message:
24
+ rdoc_options: []
25
+ require_paths:
26
+ - lib
27
+ required_ruby_version: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: '0'
32
+ required_rubygems_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ requirements: []
38
+ rubyforge_project:
39
+ rubygems_version: 2.2.2
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: Cloud Project NCI!
43
+ test_files: []