Skip to content

Commit 995f629

Browse files
author
Andrew Schuster
committed
Use respond_to? instead of try for earlier compliance
1 parent 17f6686 commit 995f629

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/swagger_v2/api_swagger_v2_hash_and_array_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module TheApi
88
class TestApi < Grape::API
99
format :json
1010

11-
documentation = ::Entities::DocumentedHashAndArrayModel.try(:documentation)
11+
documentation = ::Entities::DocumentedHashAndArrayModel.documentation if ::Entities::DocumentedHashAndArrayModel.respond_to?(:documentation)
1212

1313
desc 'This returns something'
1414
namespace :arbitrary do

0 commit comments

Comments
 (0)