Skip to content

Commit 21a6f62

Browse files
committed
Fix rubocop offenses
1 parent b395595 commit 21a6f62

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/grape-swagger/entity/attribute_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def ambiguous_model_type?(type)
7575

7676
def data_type_from(documentation)
7777
documented_type = documentation[:type]
78-
documented_type ||= (documentation[:documentation] && documentation[:documentation][:type])
78+
documented_type ||= documentation[:documentation] && documentation[:documentation][:type]
7979

8080
data_type = GrapeSwagger::DocMethods::DataType.call(documented_type)
8181

spec/support/shared_contexts/this_api.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ class Something < Grape::Entity
3636
expose :kind3, using: ThisApi::Entities::Kind, documentation: { desc: 'Tertiary kind.' }
3737
expose :tags, using: ThisApi::Entities::Tag, documentation: { desc: 'Tags.', is_array: true }
3838
expose :relation, using: ThisApi::Entities::Relation,
39-
documentation: { type: 'ThisApi::Relation', desc: 'A related model.', x: { other: 'stuff' } }
39+
documentation: {
40+
type: 'ThisApi::Relation',
41+
desc: 'A related model.',
42+
x: { other: 'stuff' }
43+
}
4044
expose :merged_attribute, using: ThisApi::Entities::Nested, merge: true
4145
end
4246
end

0 commit comments

Comments
 (0)