apiql 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/apiql.gemspec +1 -1
- data/lib/apiql.rb +13 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b31f3704ac2a7144b1d492f13cddc83b3c722cd5db52ecee24efa8889cdc4fc7
|
4
|
+
data.tar.gz: f2c5ebc7381cd7b2fd2f9cb886e674f8c68fc193071ba98a1edeb4c19b570a20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e64b9e2d197e22cb01eb14a97448551d49e89c03af894646d993abed04b8fd08c558216f82a2f7a00cd2e19bced08bac1cf3642e3b9fc7fb792ab6ed8186dc
|
7
|
+
data.tar.gz: 16460fa4e99dbd0ab42ca676f7f95a758b9d5ef83f63e07a8fe4483a5dc818145b8e873a6f2a9ecbdc10abf182ba9e7b9d64e0a0250290ed5cd98cdb828909a1
|
data/apiql.gemspec
CHANGED
data/lib/apiql.rb
CHANGED
@@ -247,14 +247,7 @@ class APIQL
|
|
247
247
|
if names.count > 1
|
248
248
|
o = nil
|
249
249
|
names.each do |field|
|
250
|
-
if o.
|
251
|
-
if o.respond_to? field
|
252
|
-
o = o.public_send(field, *params)
|
253
|
-
else
|
254
|
-
o = nil
|
255
|
-
break
|
256
|
-
end
|
257
|
-
else
|
250
|
+
if o.nil?
|
258
251
|
return unless field.to_sym.in? self.class.apiql_attributes
|
259
252
|
|
260
253
|
if respond_to? field
|
@@ -263,7 +256,14 @@ class APIQL
|
|
263
256
|
o = object.public_send(field, *params)
|
264
257
|
end
|
265
258
|
|
266
|
-
break
|
259
|
+
break if o.nil?
|
260
|
+
else
|
261
|
+
if o.respond_to? field
|
262
|
+
o = o.public_send(field, *params)
|
263
|
+
else
|
264
|
+
o = nil
|
265
|
+
break
|
266
|
+
end
|
267
267
|
end
|
268
268
|
end
|
269
269
|
|
@@ -320,16 +320,16 @@ class APIQL
|
|
320
320
|
o = nil
|
321
321
|
|
322
322
|
field.split('.').each do |name|
|
323
|
-
if o.
|
323
|
+
if o.nil?
|
324
|
+
o = object[name.to_sym]
|
325
|
+
break if o.nil?
|
326
|
+
else
|
324
327
|
if o.respond_to? name
|
325
328
|
o = o.public_send(name)
|
326
329
|
else
|
327
330
|
o = nil
|
328
331
|
break
|
329
332
|
end
|
330
|
-
else
|
331
|
-
o = object[name.to_sym]
|
332
|
-
break unless o.present?
|
333
333
|
end
|
334
334
|
end
|
335
335
|
|