Skip to content

Commit

Permalink
Change nil? to empty?
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaspin committed Jan 26, 2024
1 parent 2e2f185 commit 34a3f29
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ module CoverageResult
def self.build(hCoverageResult)
Jbuilder.new do |json|
json.dateTime hCoverageResult[:dateTime]
json.scope Scope.build(hCoverageResult[:scope])
json.scope Scope.build(hCoverageResult[:scope]) unless hCoverageResult[:scope].empty?
json.spatialRepresentationType hCoverageResult[:spatialRepresentationType]
json.spatialRepresentation SpatialRepresentation.build(hCoverageResult[:spatialRepresentation]) unless hCoverageResult[:spatialRepresentation].nil?
json.resultContentDescription CoverageDescription.build(hCoverageResult[:resultContentDescription]) unless hCoverageResult[:resultContentDescription].nil?
json.resourceFormat Format.build(hCoverageResult[:resourceFormat]) unless hCoverageResult[:resourceFormat].nil?
json.resultFile QualityResultFile.build(hCoverageResult[:resultFile]) unless hCoverageResult[:resultFile].nil?
json.spatialRepresentation SpatialRepresentation.build(hCoverageResult[:spatialRepresentation]) unless hCoverageResult[:spatialRepresentation].empty?
json.resultContentDescription CoverageDescription.build(hCoverageResult[:resultContentDescription]) unless hCoverageResult[:resultContentDescription].empty?
json.resourceFormat Format.build(hCoverageResult[:resourceFormat]) unless hCoverageResult[:resourceFormat].empty?
json.resultFile QualityResultFile.build(hCoverageResult[:resultFile]) unless hCoverageResult[:resultFile].empty?
end
end
end
Expand Down

0 comments on commit 34a3f29

Please sign in to comment.