weatai 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weatai/instant.rb +7 -4
- data/lib/weatai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3053aff58ec0b00bb2eb0306d50e34fa11bbab7
|
4
|
+
data.tar.gz: 4f1374b52f8d4b2043e869a71badccefb6d691bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e80be20a15a89ef033483b20666413f9ec81a8aab5358b3b18319ad413416e1e6a4ecb7eb8c5495050fbf7a11f35f69bfd6e0406e92c672a29f849cc71543d4a
|
7
|
+
data.tar.gz: 22533e6aec8c6484237e54f9dbaef38a595252ee9b81e1fddce4a8a820af08d8bb7162f217258c80104b0a085f466ed7a1e5489448cddb02168616a156a18ca2
|
data/lib/weatai/instant.rb
CHANGED
@@ -12,6 +12,7 @@ module CWB
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.instant
|
15
|
+
#return @instant if @instant
|
15
16
|
station = CWB::Rain.instant_rain.keys
|
16
17
|
all_location1 = CWB::Weather.instant_weather
|
17
18
|
all_location2 = CWB::Rain.instant_rain
|
@@ -20,7 +21,7 @@ module CWB
|
|
20
21
|
station.each do |item|
|
21
22
|
location = {}
|
22
23
|
place = item
|
23
|
-
location['time'] =
|
24
|
+
location['time'] = all_location1[item]['time']
|
24
25
|
location['city'] = all_location2[item]['city']
|
25
26
|
location['town'] = all_location2[item]['town']
|
26
27
|
location['TEMP'] = all_location1[item]['TEMP']
|
@@ -37,12 +38,14 @@ module CWB
|
|
37
38
|
def self.local(position)
|
38
39
|
station = CWB::Rain.instant_rain.keys
|
39
40
|
if (position.in?(station))
|
40
|
-
|
41
|
-
else
|
42
|
-
puts "Please enter a station!"
|
41
|
+
CWB::INSTANT.instant.assoc(position)
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
45
|
+
def self.find(dataid:)
|
46
|
+
new(dataid: dataid)
|
47
|
+
end
|
48
|
+
|
46
49
|
def weather_test
|
47
50
|
return 'weather_test_yes'
|
48
51
|
end
|
data/lib/weatai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weatai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- soainfinite888
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|