infostrada 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/infostrada/person_info.rb +14 -9
- data/lib/infostrada/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27dc57d05a8dda8028e5277f40f37c3c54abb4a2
|
4
|
+
data.tar.gz: f270a70f2c00f227506b467f0944138c0e569041
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2081e65cd8379bd3d0f00acb2c6951c296e51221f9b8ca22e9d390e88b79997138d160931749040c3dcdce07c092b7b1c6f1de340aa9e41fec980fd09cd42ae4
|
7
|
+
data.tar.gz: f03d4a93953f6a623d7f0122ca8addce70eeeefac0ab87da45df08bc5b6ffe3ca7e577cf10396f20f25aa7683f65cf0bfa91045c868d1c1048f9a2c5c115515f
|
@@ -9,22 +9,27 @@ module Infostrada
|
|
9
9
|
|
10
10
|
def self.where(options)
|
11
11
|
id = options.delete(:person_id)
|
12
|
+
|
12
13
|
info = get!(URL, query: { personid: id }).first
|
14
|
+
|
13
15
|
self.new(id, info)
|
14
16
|
end
|
15
17
|
|
16
18
|
def initialize(id, info)
|
17
19
|
@id = id
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
# Sometimes info comes as an empty array...
|
22
|
+
if info && !info.empty?
|
23
|
+
@first_name = info['c_FirstName']
|
24
|
+
@last_name = info['c_LastName']
|
25
|
+
@public_name = info['c_PublicName']
|
26
|
+
@nickname = info['c_Nickname']
|
27
|
+
@birthdate = Formatter.format_date(info['d_BirthDate'])
|
28
|
+
@height = info['n_Height']
|
29
|
+
@weight = info['n_Weight']
|
30
|
+
@birth_city = info['c_BirthCity']
|
31
|
+
@birth_country = info['c_BirthCountry']
|
32
|
+
end
|
28
33
|
end
|
29
34
|
end
|
30
35
|
end
|
data/lib/infostrada/version.rb
CHANGED