Skip to content

Commit a55cf24

Browse files
committed
Replace !(.empty? || .nil?) with .present?
1 parent ee316f4 commit a55cf24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/grape_entity/entity.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def self.with_options(options)
202202
# #docmentation, any exposure without a documentation key will be ignored.
203203
def self.documentation
204204
@documentation ||= exposures.each_with_object({}) do |(attribute, exposure_options), memo|
205-
unless exposure_options[:documentation].nil? || exposure_options[:documentation].empty?
205+
if exposure_options[:documentation].present?
206206
memo[key_for(attribute)] = exposure_options[:documentation]
207207
end
208208
end

0 commit comments

Comments
 (0)