F2C 0.0.0

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/F2C.rb +15 -0
  3. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 299e6cca8e73115d0fdbb93ef448ab7449206328
4
+ data.tar.gz: c09b789b1a06aeacacb7f2a52f2105956c94aa01
5
+ SHA512:
6
+ metadata.gz: e763cf98f4544bd538152bc997b9dc0bd054480a712a707a5e8c52aa0c09088318974b3255dc1d63ad2ff62f5f145e41483d064a1b43e652e989eff29a309849
7
+ data.tar.gz: 84f2b19a8d80173d7c280795696da9b0472791099b6159a22b8994f80f2ab4e3d51706255ea1c316713da05b56897d8b50d83de8e55c11034ccb85b5376efc0b
data/lib/F2C.rb ADDED
@@ -0,0 +1,15 @@
1
+ module Convert
2
+ #http://www.manuelsweb.com/temp.htm
3
+
4
+ def self.F2C value
5
+ converted_value = ((value - 32) * 5.0/9.0).round
6
+ return "#{value} Fahrenheit is #{converted_value} Celsius"
7
+ end
8
+
9
+ def self.C2F value
10
+ converted_value = ((value * 9.0/5.0) + 32).round
11
+ return "#{value} Celsius is #{converted_value} Fahrenheit"
12
+ end
13
+
14
+ end
15
+
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: F2C
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Kenny Lu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-21 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Class project - F2C converts Fahrenheit to Celsius and vice versa
14
+ email:
15
+ - lukenny@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/F2C.rb
21
+ homepage: http://rubygems.org/gems/F2C
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.0.14
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Class project - Fahrenheit to Celsius conversion and vice versa
45
+ test_files: []