tmpcov 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 (2) hide show
  1. data/lib/tmpcov.rb +33 -0
  2. metadata +54 -0
@@ -0,0 +1,33 @@
1
+ class Gettmp
2
+ def self.c2f(tmp)
3
+ celsius = Celsius.new(tmp)
4
+ celsius.toFahrenheit
5
+ end
6
+
7
+ def self.f2c(tmp)
8
+ fahrenheit = Fahrenheit.new(tmp)
9
+ fahrenheit.toCelsius
10
+ end
11
+ end
12
+
13
+ class Gettmp::Celsius
14
+ def initialize(tmp)
15
+ @tmp = tmp
16
+ end
17
+
18
+ def toFahrenheit
19
+ @f = @tmp * 1.8 + 32
20
+ puts @f
21
+ end
22
+ end
23
+
24
+ class Gettmp::Fahrenheit
25
+ def initialize(tmp)
26
+ @tmp = tmp
27
+ end
28
+
29
+ def toCelsius
30
+ @c = (@tmp - 32) * 0.555556
31
+ puts @c
32
+ end
33
+ end
metadata ADDED
@@ -0,0 +1,54 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tmpcov
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.0
6
+ platform: ruby
7
+ authors:
8
+ - Bill Yang
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2014-10-14 00:00:00 Z
14
+ dependencies: []
15
+
16
+ description: A simple function to convert Celsius and Fahrenheit
17
+ email: a14z8fy@aiit.ac.jp
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files: []
23
+
24
+ files:
25
+ - lib/tmpcov.rb
26
+ homepage: http://rubygems.org/gems/tmpcov
27
+ licenses:
28
+ - MIT
29
+ post_install_message:
30
+ rdoc_options: []
31
+
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ none: false
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: "0"
40
+ required_rubygems_version: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: "0"
46
+ requirements: []
47
+
48
+ rubyforge_project:
49
+ rubygems_version: 1.8.23.2
50
+ signing_key:
51
+ specification_version: 3
52
+ summary: temperature convert function
53
+ test_files: []
54
+