myweatherforecast 0.3.3 → 0.4.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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/myweatherforecast.rb +17 -1
- metadata +1 -1
- 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: 724647c8f6324b8f09781b112a58c1c2844fea17
|
|
4
|
+
data.tar.gz: 446d0270e1c999c8688dc8c8e461ca8e84f9ec34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 17ddb50b0858836debd1e61b60e868fc078d000663b86e5481c7120a839b8b1bc594d094ef333c142c9de6880c9aa85fdb91b6884cc77e2deea640f6fbf99242
|
|
7
|
+
data.tar.gz: 7671182c6e45fb87fd4f1adb17e0b4d093c09f1071ff14e1839cb90292ec814a98af44d492df6fc1132f6f35a54100dc782bbcfefb542769737072b5505b7983
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/myweatherforecast.rb
CHANGED
|
@@ -138,7 +138,8 @@ class MyWeatherForecast
|
|
|
138
138
|
end
|
|
139
139
|
|
|
140
140
|
def to_s
|
|
141
|
-
"
|
|
141
|
+
"%s: %s - %s, %s" % [Date::ABBR_DAYNAMES[self.time.wday], \
|
|
142
|
+
tempmin, tempmax, @x.summary]
|
|
142
143
|
end
|
|
143
144
|
|
|
144
145
|
def temperature()
|
|
@@ -155,6 +156,21 @@ class MyWeatherForecast
|
|
|
155
156
|
|
|
156
157
|
end
|
|
157
158
|
|
|
159
|
+
|
|
160
|
+
# e.g.
|
|
161
|
+
# require 'myweatherforecast'
|
|
162
|
+
#
|
|
163
|
+
# w = MyWeatherForecast.new api_key: '465xxxxxxxxxxxxxx76ea01cbff4'
|
|
164
|
+
# puts w.days.take 3
|
|
165
|
+
#
|
|
166
|
+
# Fri: 8° - 14°, Mostly cloudy throughout the day.
|
|
167
|
+
# Sat: 6° - 13°, Light rain until afternoon.
|
|
168
|
+
# Sun: 5° - 12°, Mostly cloudy throughout the day.
|
|
169
|
+
|
|
170
|
+
def days()
|
|
171
|
+
@forecast['daily']['data'].map {|day| OutlookDay.new(day, @tlabel) }
|
|
172
|
+
end
|
|
173
|
+
|
|
158
174
|
def today()
|
|
159
175
|
Day.new(@forecast, @tlabel)
|
|
160
176
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|