izi_plagiarism_client 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/plagiarism/client/report.rb +10 -16
- data/lib/plagiarism/client/version.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: 25d975f1f8e7485d3dfca9a94106f7e9fdbd707e
|
4
|
+
data.tar.gz: 43dc6e2eb435a4deb052f7d8751fcd13a803d4b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4ef8a9c3eca1401fbdce951371a2b462a074d8087afcfb0886bb0ac743c2238f9590b04a7ced2ddb8eb68c01a2bf5920e434e913862e36d0715c67e4b863668
|
7
|
+
data.tar.gz: bf2e7e75055c93e80c4913fb39652420495b6ff0ced4fcd9865598ce0cee95d600cc6929911a466db772a3351ca7be96c09a1f34f6d8fe6359698e53d1442cca
|
@@ -21,27 +21,21 @@ module Plagiarism
|
|
21
21
|
structed get("/api/v1/reports/#{report_id}")
|
22
22
|
end
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
structed(data)
|
27
|
-
end
|
28
|
-
|
29
|
-
def structed(data = {})
|
30
|
-
obj = OpenStruct.new(data)
|
31
|
-
|
32
|
-
DATETIME_FIELDS.each do |field|
|
33
|
-
next if obj[field].blank? || !obj[field].is_a?(String)
|
34
|
-
obj[field] = Time.zone.parse(obj[field])
|
35
|
-
end
|
36
|
-
|
37
|
-
obj
|
38
|
-
end
|
24
|
+
def from_params(params)
|
25
|
+
structed params
|
39
26
|
end
|
40
27
|
|
41
28
|
private
|
42
29
|
|
43
30
|
def structed(data = {})
|
44
|
-
|
31
|
+
obj = OpenStruct.new(data)
|
32
|
+
|
33
|
+
DATETIME_FIELDS.each do |field|
|
34
|
+
next if obj[field].blank? || !obj[field].is_a?(String)
|
35
|
+
obj[field] = Time.zone.parse(obj[field])
|
36
|
+
end
|
37
|
+
|
38
|
+
obj
|
45
39
|
end
|
46
40
|
end
|
47
41
|
end
|