We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
!(.empty? || .nil?)
.present?
1 parent ee316f4 commit a55cf24Copy full SHA for a55cf24
lib/grape_entity/entity.rb
@@ -202,7 +202,7 @@ def self.with_options(options)
202
# #docmentation, any exposure without a documentation key will be ignored.
203
def self.documentation
204
@documentation ||= exposures.each_with_object({}) do |(attribute, exposure_options), memo|
205
- unless exposure_options[:documentation].nil? || exposure_options[:documentation].empty?
+ if exposure_options[:documentation].present?
206
memo[key_for(attribute)] = exposure_options[:documentation]
207
end
208
0 commit comments