clientele 0.3.11 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8207fdcdcd84032d25d8326f164adfe78c1127d3
4
- data.tar.gz: 49fef12babfe85a269d5bfda4189c9b6e9c51374
3
+ metadata.gz: 8a9de556f76af020598d75acc6e88342b1883ff3
4
+ data.tar.gz: 49ca10119b63bd8f6b2d8fdf193fa0feaac719aa
5
5
  SHA512:
6
- metadata.gz: ec6d1576db4412c82976bd30215b56b51a490dee08721f09beb7c153999fb10445c3351f7d27033a9f35548ff9f276b145eb648c0b0cc582a4be94f69416a715
7
- data.tar.gz: 0a2d471117284e00096927c40532810cd1de570a28f390fd5db659756386ebca15299b045fe768533dc6c100c34e00542673fd3c5ffb38e525c3c85e15d9aa20
6
+ metadata.gz: 854171f71a536110e927c6d315e2c11d9f563c32fa1ef3e3606b2b164fa2a7ba173f2ba82790927192d2ab7028dfe8aebd1d28efbc8a30e38b99e928b317294f
7
+ data.tar.gz: 48c490df9685c2499973ec329f2450bc381fd66b77c058456a366145f985c0b323f64fa58c4983f0b6123e69c1813bf4a100ee0508feb9b1bf221e4535114227
@@ -54,12 +54,16 @@ module Clientele
54
54
  @result_key || method_name.to_s.singularize
55
55
  end
56
56
 
57
+ def results_key
58
+ @results_key || (@result_key || method_name).to_s.pluralize
59
+ end
60
+
57
61
  def result(data)
58
62
  data[result_key]
59
63
  end
60
64
 
61
65
  def results(data)
62
- result(data) if result(data) and result(data).kind_of?(Array)
66
+ data[results_key] if data[results_key] and data[results_key].kind_of?(Array)
63
67
  end
64
68
 
65
69
  def build(data, client: nil, response: nil)
@@ -1,3 +1,3 @@
1
1
  module Clientele
2
- VERSION = "0.3.11"
2
+ VERSION = "0.3.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clientele
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Keele