wes-data-api 10.3.0 → 10.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wes/data/api/model/brief.rb +12 -0
- data/lib/wes/data/api.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: 83adde3b98be27d8ce63787d41cff3b1e1e62ce1
|
4
|
+
data.tar.gz: f0b8b92d1657ffe9a42ae50ebfe7292af2628c10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e373f9b185a197abd1cc141af841a5a03bd941668525c3b095902ea0bae30eebc72d94900a67968576abe187a61504afa13ee565fe7223b9fef05d44c83208c
|
7
|
+
data.tar.gz: a03fd51567f2b521d0949503483899da7ba8b32bb6efff83e1dcac0654447f8538379a9b3928ffc5b561d9b10b2a72de515bf0fb1006b0bb842018b95d8e7dd8
|
@@ -60,8 +60,20 @@ module Wes
|
|
60
60
|
)
|
61
61
|
end
|
62
62
|
|
63
|
+
def insights(type)
|
64
|
+
data = insight_data(type)
|
65
|
+
|
66
|
+
JSON.parse(data)
|
67
|
+
end
|
68
|
+
|
63
69
|
private
|
64
70
|
|
71
|
+
def insight_data(type)
|
72
|
+
method_name = format("insights_%s", type)
|
73
|
+
raise NoMethodError unless @attributes.respond_to?(method_name)
|
74
|
+
@attributes.send(method_name)
|
75
|
+
end
|
76
|
+
|
65
77
|
def answers_route
|
66
78
|
[routes.brief, id, routes.answers].join('/')
|
67
79
|
end
|
data/lib/wes/data/api.rb
CHANGED