weather-report 0.2.1 → 0.3.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: 215e7ea53b6c80070765674a8b7c2af6c449dee4
4
- data.tar.gz: f1b6bbb7511eead4d7ebcdfa41b6ce74f565d169
3
+ metadata.gz: 659355896bed0ea8e3f6870080baceb05560f031
4
+ data.tar.gz: 2c538a8737be60c33b7c3f38abea4c81780aca21
5
5
  SHA512:
6
- metadata.gz: e3534d9288839c83fc4765c7d32ac3fc19cbb601d7da6e3f43b34934c5c10f601c40f942c7f4ae858671bc55eb68943e6be63909b8bda21f17541e5ea5e824d9
7
- data.tar.gz: cf458b6f5fefbad98af35dcaaeee64d6ef49a9c942171389913afb22a8d74d13b5c31724e4091ec2d839155bdfc3b16f62692078688989224271c07c0505bdba
6
+ metadata.gz: 3cda16efb9830d08d385d30e3b48e6936adcb87200ee878604fed7a32c0ae26c548825c1c01f4d51e6de5a77dc9d3eafd75ecee674c9edb25914aef3f514eca3
7
+ data.tar.gz: 99221e105ab51124fa488694eb9726f9224c939225c0c9ead7849ba2fd52d6ed437f0b0e6053e757aab0f92148b35a4a07c55bb83b40e4fdb4669108d5b540ac
@@ -8,6 +8,11 @@ module WeatherReport
8
8
  @forecast = forecast(forecasts, dateLabel)
9
9
  end
10
10
 
11
+ # @return [Trueclass, Falseclass] return true if it will be rainy or snowy or sleety or hailstorm
12
+ def umbrella?
13
+ telop =~ /[雨雪霙雹]/ ? true : false
14
+ end
15
+
11
16
  # @return [Date] the date
12
17
  def date
13
18
  year, month, day = @forecast["date"].split('-')
@@ -1,3 +1,3 @@
1
1
  module WeatherReport
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -16,6 +16,10 @@ class TestDay < MiniTest::Unit::TestCase
16
16
  assert_instance_of Day, Day.new(@forecasts, "明日")
17
17
  end
18
18
 
19
+ def test_umbrella?
20
+ assert_respond_to @day, :umbrella?
21
+ end
22
+
19
23
  def test_date
20
24
  assert_respond_to @day, :date
21
25
  assert_instance_of Date, @day.date
@@ -37,6 +41,5 @@ class TestDay < MiniTest::Unit::TestCase
37
41
 
38
42
  def test_to_h
39
43
  assert_respond_to @day, :to_h
40
- puts @day.to_h
41
44
  end
42
45
  end
@@ -49,6 +49,5 @@ class TestWeather < MiniTest::Unit::TestCase
49
49
 
50
50
  def test_to_h
51
51
  assert_respond_to @weather, :to_h
52
- puts @weather.to_h
53
52
  end
54
53
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weather-report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zakuni