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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23dfdcaeb596c082c34a5a7271f7ec3beddf523f
4
- data.tar.gz: 30be4fa1800560dd6283e3238bc3e8f459440c1d
3
+ metadata.gz: 724647c8f6324b8f09781b112a58c1c2844fea17
4
+ data.tar.gz: 446d0270e1c999c8688dc8c8e461ca8e84f9ec34
5
5
  SHA512:
6
- metadata.gz: ac0ff783144d990464f90aea7b4cd494318268b5a0e5b626ce79b220d4017f00898b82ca492c224768a6b9761bb886b84d2baaedb73c51917758317a6f2888d5
7
- data.tar.gz: 9ab41deeecb1a178036907a61f8fd1b9cadc9ee1db19ea2df73731ce8924a48fdbbd52f6a14e43cf548ac3e11fc1f235c8c625529dbbcacaa477459ec264b95a
6
+ metadata.gz: 17ddb50b0858836debd1e61b60e868fc078d000663b86e5481c7120a839b8b1bc594d094ef333c142c9de6880c9aa85fdb91b6884cc77e2deea640f6fbf99242
7
+ data.tar.gz: 7671182c6e45fb87fd4f1adb17e0b4d093c09f1071ff14e1839cb90292ec814a98af44d492df6fc1132f6f35a54100dc782bbcfefb542769737072b5505b7983
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -138,7 +138,8 @@ class MyWeatherForecast
138
138
  end
139
139
 
140
140
  def to_s
141
- "min: %s max: %s, %s" % [tempmin, tempmax, @x.summary]
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myweatherforecast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file