getresult 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/getresult.rb +33 -0
  3. metadata +43 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3c3b3b0951257be3fda4ec63c973ac9116054ab6
4
+ data.tar.gz: 3eeb951a9757ac7970e60c77064ada07f75f7f18
5
+ SHA512:
6
+ metadata.gz: bcac13d4fb7c0445ac4bc10fab2cb27b4848d0d5de08913cbacaead0fbe7bc2de35f54e6bb41dcc7077f8a4721f4a85954b98a3a2c80a115f17268873d2e69f5
7
+ data.tar.gz: 9c7e901729f63cb07f19373dd2debb69c1cd111dec99fd8fc2fc474e19f11e71fe69ed49131a469a51b060d4a2f74dfbbfbe4b1903b9e8dfd72a18f63f4af91f
data/lib/getresult.rb ADDED
@@ -0,0 +1,33 @@
1
+ class Checkanswer
2
+ def self.getresult(ans1, ans2, ans3, ans4, ans5, ans6, ans7, ans8, ans9, ans10)
3
+ score = 0
4
+ if ans1 == 1
5
+ score=score+10
6
+ end
7
+ if ans2 == 1
8
+ score=score+10
9
+ end
10
+ if ans3 == 1
11
+ score=score+10
12
+ end
13
+ if ans4 == 1
14
+ score=score+10
15
+ end
16
+ if ans6 == 1
17
+ score=score+10
18
+ end
19
+ if ans7 == 1
20
+ score=score+10
21
+ end
22
+ if ans8 == 1
23
+ score=score+10
24
+ end
25
+ if ans9 == 1
26
+ score=score+10
27
+ end
28
+ if ans10 == 1
29
+ score=score+10
30
+ end
31
+ return score
32
+ end
33
+ end
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: getresult
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Aliona Lobanova
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-25 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: gem gets the score
14
+ email: alionkal@list.ru
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/getresult.rb
20
+ homepage: http://rubygems.org/gems/isresult
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: gem gets the score
43
+ test_files: []