apiql 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/apiql.gemspec +1 -1
  3. data/lib/apiql.rb +13 -13
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da237b810c30af8f312652d463e5a4ba2ee980653052a74e0533ee46cba32ebd
4
- data.tar.gz: 110df82b41b3cd9a670ce414c40fa61d8e872fc9067d25e2949f030fa746ded2
3
+ metadata.gz: b31f3704ac2a7144b1d492f13cddc83b3c722cd5db52ecee24efa8889cdc4fc7
4
+ data.tar.gz: f2c5ebc7381cd7b2fd2f9cb886e674f8c68fc193071ba98a1edeb4c19b570a20
5
5
  SHA512:
6
- metadata.gz: 01a25bbf772de28b18c1bc8d16e4e4bcddcb2feadbbe8a2218a8a6d526745a47ea71f12de7f383da317de68e880d01e25258aaf899a7b4c34b31a147ede70a85
7
- data.tar.gz: 2b5a81697b13a95e2030d101d4c126af165c5422f4dffee8bc867098f37e0521f934d26adffc8bac8f20068c3a345b8584accacedd01847a38fcda8a86a537eb
6
+ metadata.gz: 92e64b9e2d197e22cb01eb14a97448551d49e89c03af894646d993abed04b8fd08c558216f82a2f7a00cd2e19bced08bac1cf3642e3b9fc7fb792ab6ed8186dc
7
+ data.tar.gz: 16460fa4e99dbd0ab42ca676f7f95a758b9d5ef83f63e07a8fe4483a5dc818145b8e873a6f2a9ecbdc10abf182ba9e7b9d64e0a0250290ed5cd98cdb828909a1
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'apiql'
7
- spec.version = '0.3.4'
7
+ spec.version = '0.3.5'
8
8
  spec.authors = ['Dmitry Silchenko']
9
9
  spec.email = ['dmitry@desofto.com']
10
10
 
@@ -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.present?
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 unless o.present?
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.present?
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Silchenko