wes-data-api 5.8.0 → 5.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/wes/data/api/model/challenge_answer.rb +16 -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: 722668ce5a55fbfe928eb3d5e02e6bae392563ac
|
4
|
+
data.tar.gz: a66d15fd5a00300a2066a04f02fb4cd5a3a495d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed7715f6040de906ddf5d8eae019698f0c692cddb04577ef0f1410cb1d54f72fb01704081d4fb3589f4223371cb430d1be4f7a6aefbe22f4897be07d0f4c08b9
|
7
|
+
data.tar.gz: 40537b35dd9e4824250e7d2f71d2347dc863bcd317ba30b30e1f46720abe397e4cc63d76df8593fb5485b921afcc36ef43c59c7ab96d38c4d1d6f035449df2e9
|
@@ -5,6 +5,22 @@ module Wes
|
|
5
5
|
module API
|
6
6
|
module Model
|
7
7
|
class ChallengeAnswer < Base
|
8
|
+
def id
|
9
|
+
ids_set? ? id_hash : nil
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def ids_set?
|
15
|
+
@attributes.challenge_id != nil && @attributes.question_id != nil
|
16
|
+
end
|
17
|
+
|
18
|
+
def id_hash
|
19
|
+
{
|
20
|
+
"challenge_id" => @attributes.challenge_id,
|
21
|
+
"question_id" => @attributes.question_id
|
22
|
+
}
|
23
|
+
end
|
8
24
|
end
|
9
25
|
end
|
10
26
|
end
|
data/lib/wes/data/api.rb
CHANGED