grape-dsl 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/grape-dsl/dsl.rb +6 -4
- 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: c082b667ab1be80b65db4c1f4e851720a3f3dbe5
|
4
|
+
data.tar.gz: 8dabf70adebcf63f065c8a6b438c7b61ae1a9673
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2a574f5483751fea3e2ead8cbc7abefdca25b6908c60e5b4f7b2d26f7c1569729cc66635ad26c530333fc6d3a47a76db5194018b8ae639a4f9532e4aa542ae2
|
7
|
+
data.tar.gz: 7792e998a3608b9613b1277d636aef4ccedaef55b4d52118a5095ab77e53e0719ca4b62b87eec3b94fec78a040dba8a2e15efeb600e3958615c670de1d020221
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.3
|
data/lib/grape-dsl/dsl.rb
CHANGED
@@ -37,7 +37,8 @@ module GrapeDSL
|
|
37
37
|
# convent_type -> real content type
|
38
38
|
def description(*args)
|
39
39
|
|
40
|
-
|
40
|
+
@last_description ||= {}
|
41
|
+
unless @last_description[:desc].class == ::GrapeDSL::Extend::APIMNT::Description
|
41
42
|
|
42
43
|
var= ::GrapeDSL::Extend::APIMNT::Description.new(*args)
|
43
44
|
|
@@ -49,16 +50,17 @@ module GrapeDSL
|
|
49
50
|
content_type_name ||= element.to_s.upcase
|
50
51
|
end
|
51
52
|
end
|
52
|
-
|
53
|
+
|
54
|
+
var.content_type= content_type_name if var.content_type.nil?
|
53
55
|
|
54
56
|
end
|
55
57
|
|
56
58
|
var.desc= desc.to_s
|
57
|
-
desc var
|
59
|
+
@last_description[:desc]= var
|
58
60
|
|
59
61
|
end
|
60
62
|
|
61
|
-
return desc
|
63
|
+
return @last_description[:desc]
|
62
64
|
|
63
65
|
end
|
64
66
|
|