Class: HotelBeds::Model::SearchResult

Inherits:
Object
  • Object
show all
Includes:
HotelBeds::Model
Defined in:
lib/hotel_beds/model/search_result.rb

Instance Method Summary collapse

Methods included from HotelBeds::Model

#deep_attributes, included

Instance Method Details

#priceObject

returns the total price of all the rooms collectively



14
15
16
# File 'lib/hotel_beds/model/search_result.rb', line 14

def price
  rooms.map(&:price).inject(BigDecimal.new("0.0"), :+)
end