Skip to content

Commit

Permalink
using unless one liner
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
nmerket committed Jul 31, 2019
1 parent 8c11a80 commit 91e95b6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions resources/hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ def self.add_site_neighbor(hpxml:,
neighbor_building = XMLHelper.add_element(neighbors, "NeighborBuilding")
XMLHelper.add_element(neighbor_building, "Azimuth", Integer(azimuth))
XMLHelper.add_element(neighbor_building, "Distance", Float(distance))
if not height.nil?
XMLHelper.add_element(neighbor_building, "Height", Float(height))
end
XMLHelper.add_element(neighbor_building, "Height", Float(height)) unless height.nil?

return neighbor_building
end
Expand Down

0 comments on commit 91e95b6

Please sign in to comment.