s44_myweatherforecast 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -1
- data.tar.gz.sig +0 -0
- data/lib/s44_myweatherforecast.rb +32 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f79e82209f61052fd450eda061ce71094da849f9
|
4
|
+
data.tar.gz: 7443836247a263159747bd787edaff778bda39d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9b3ba43d15c55d57c6a6e8a0de8e38c8cd42b092f7d698d0158b21714e02ab49d6ff0a4ecafb7fc5c6037fce06ce98fad3d3b14e6eaec7425cc6bec4e914a0b
|
7
|
+
data.tar.gz: 03089a245af5b4a25c7426f9ebed968c21a263b5c2b57c706cc1f886ed4d0cde95e23fe7d3375daadf83ece42ab465c7d335c1eb27de0ab9adf2c9a6e808351a
|
checksums.yaml.gz.sig
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
@@ -10,10 +10,31 @@ class S44_MyWeatherForecast
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def afternoon()
|
13
|
-
summary
|
13
|
+
summary :afternoon
|
14
14
|
end
|
15
|
+
|
16
|
+
def ahead()
|
17
|
+
self.method(@w.today.ahead).call
|
18
|
+
end
|
19
|
+
|
20
|
+
alias this_afternoon afternoon
|
21
|
+
|
22
|
+
def early_hours()
|
23
|
+
summary :early_hours
|
24
|
+
end
|
25
|
+
|
26
|
+
def evening()
|
27
|
+
summary :evening
|
28
|
+
end
|
15
29
|
|
16
|
-
alias
|
30
|
+
alias this_evening evening
|
31
|
+
|
32
|
+
def tonight()
|
33
|
+
summary :night
|
34
|
+
end
|
35
|
+
|
36
|
+
alias night tonight
|
37
|
+
|
17
38
|
|
18
39
|
private
|
19
40
|
|
@@ -36,8 +57,16 @@ class S44_MyWeatherForecast
|
|
36
57
|
s3 = "with a minimum temperature of #{min} celcius " +
|
37
58
|
"and a maximum temperature of #{max} celcius"
|
38
59
|
|
39
|
-
|
60
|
+
t = case period
|
61
|
+
when :night
|
62
|
+
'tonight'
|
63
|
+
when :early_hours
|
64
|
+
'in the early hours'
|
65
|
+
else
|
66
|
+
'this ' + period.to_s
|
67
|
+
end
|
40
68
|
|
69
|
+
s1 = "The weather #{t} is to be"
|
41
70
|
[s1, s2.downcase, s3].join(' ') + '.'
|
42
71
|
|
43
72
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s44_myweatherforecast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -63,6 +63,6 @@ rubyforge_project:
|
|
63
63
|
rubygems_version: 2.4.8
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
|
-
summary: 'Under development: Uses the myweatherforecast gem to
|
66
|
+
summary: 'Under development: Uses the myweatherforecast gem to generate a summary
|
67
67
|
of the weather forecast in plain English.'
|
68
68
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|