s44_myweatherforecast 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a42efde87b7fd6371a103de1e8e3998ce8dc8df
4
- data.tar.gz: 625fd52f6e855b06f6f508c8fac5d9dabb1adf67
3
+ metadata.gz: b200ab26b815ac2751d6b48ccdf753f852458718
4
+ data.tar.gz: b028f8eb216d6b2a8ebcac5e589e0937444c00ea
5
5
  SHA512:
6
- metadata.gz: 4995c00dfedaa9f6c54731d66c5e113ddfb792f92f85f99826edd8030d2ca716988b2fe891744f216435a75c2b70970632407eaaf67641c85b9fe2328d7b62da
7
- data.tar.gz: 0c8b55306d90ca3c76e677550ae984d30ad2a5d7f9ab4ecc474c24c45294fb7f93d999deb346191317d47e7f68e1f290519107a6482a68c2d2128f9ad0dd7dca
6
+ metadata.gz: 9dd5e1658982d977ddcb123b24bd4ccd62d14b2c32f6a0c9e3b22e0fa879975d140ad5487faab5d150f58c990ba63ca2c962a7fe40373086ee3bf0bcb1109f0f
7
+ data.tar.gz: 1e9fb67681cd1bf267904b6d0935372e244898433f07a79edc6cb8245483635565b0cc401e895fed6329bb413bcda191d9bbd5870d824c9c604870ace480ba28
checksums.yaml.gz.sig CHANGED
Binary file
@@ -29,7 +29,20 @@ class S44_MyWeatherForecast
29
29
 
30
30
  def evening()
31
31
  summary :evening
32
- end
32
+ end
33
+
34
+ # e.g. is it going to rain tomorrow? return an array of periods within the
35
+ # day of when it will rain or an empty array if there is no rain forecast
36
+
37
+ def query(day=:tomorrow, desc='rain')
38
+
39
+ %i(morning afternoon evening early_hours night).select do |x|
40
+ @w.method(day.to_sym).call.method(x).call.detect do |x|
41
+ x.to_s =~ /#{desc}/i
42
+ end
43
+ end
44
+
45
+ end
33
46
 
34
47
  alias this_evening evening
35
48
 
data.tar.gz.sig CHANGED
Binary file
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.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  wNU0aSGt6u5Oh3cJFs6Zfm4W33vT5usVkr6pvh0cTHy+lAA7bmI4yItqT3Pr3TOD
32
32
  YImZerPvCoY8xQ==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-04-26 00:00:00.000000000 Z
34
+ date: 2017-04-28 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@jamesrobertson.eu
metadata.gz.sig CHANGED
Binary file