Skip to content

Commit c3397c2

Browse files
committed
Address comments: clean up code style in parse_params.rb
1 parent 29afe07 commit c3397c2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/grape-swagger/doc_methods/parse_params.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ def document_array_param(value_type)
6464
if value_type[:is_array]
6565
if value_type[:documentation].present?
6666
param_type = value_type[:documentation][:param_type]
67-
if (doc_type = value_type[:documentation][:type])
68-
type = GrapeSwagger::DocMethods::DataType.mapping(doc_type)
69-
end
67+
doc_type = value_type[:documentation][:type]
68+
type = GrapeSwagger::DocMethods::DataType.mapping(doc_type) if doc_type
7069
end
7170
array_items = { 'type' => type || value_type[:data_type] }
7271

0 commit comments

Comments
 (0)