wes-data-api 11.0.0 → 11.1.0

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: 0d1f5e364b9fe620bc778aa13c14472e2280dfc0
4
- data.tar.gz: 502fc025a866651ee909d6b4dab9db9fcaf16480
3
+ metadata.gz: fcc200de904dee53f764ca2f5e0b1bef99d5c6e7
4
+ data.tar.gz: 0ffb6ce9438cefe3bfc3eed01dc1042c393dbdb8
5
5
  SHA512:
6
- metadata.gz: 7591edd66a1ceb587e5d1f5ed40e5c87a80bb155397afcd8064993ae5748f2db91aef4561d13c066a5a05b4ea57a544650f9131b22fc916dc839ceaf43ecb4c9
7
- data.tar.gz: fe2ab64aed4472a8053a45002489f909dde8f478f3977c688195ddfeae668a64e273dd46e985c4133d789fe504353596a4619dbfb56bd8b5ea8d63d6333c19a8
6
+ metadata.gz: f65b6fbb79507b8e80082b7a9752a4b850349f6ae6c3fd4be10f2fb0d5070b727fc1997c4af6bab594dab4b3bbba14ed71316c547872ae6fdcabc3c5023a1f53
7
+ data.tar.gz: 0f69db3e6c834e047f9f9fa46fee35d5fa17ae3a4f7c56b32e40ab91cd465d64fb5cdba5e10734098b8c18acf0d85f953e4b18f7b1db30534600e7a83bf9b1d8
data/lib/wes/data/api.rb CHANGED
@@ -5,7 +5,7 @@ require 'wes/data/api/configuration'
5
5
  module Wes
6
6
  module Data
7
7
  module API
8
- VERSION = '11.0.0'.freeze
8
+ VERSION = '11.1.0'.freeze
9
9
  end
10
10
  end
11
11
  end
@@ -34,6 +34,11 @@ module Wes
34
34
  @pagination ||= Pagination.new(@pagination_data)
35
35
  end
36
36
 
37
+ def map_results(model_klass)
38
+ @data = @data.map { |a| model_klass.new(a) }
39
+ self
40
+ end
41
+
37
42
  private
38
43
 
39
44
  def parse_response(response)
@@ -26,7 +26,7 @@ module Wes
26
26
  offset
27
27
  )
28
28
  attributes = client.get(route)
29
- attributes.map { |a| model_klass.new(a) }
29
+ attributes.map_results(model_klass)
30
30
  end
31
31
 
32
32
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wes-data-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.0.0
4
+ version: 11.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''