Class: Api::V5::RestaurantPackageFetcher

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/api/v5/restaurant_package_fetcher.rb

Class Method Summary collapse

Class Method Details

.call(restaurant_package, include_restaurant: false) ⇒ Object



4
5
6
7
8
9
10
# File 'app/controllers/api/v5/restaurant_package_fetcher.rb', line 4

def self.call(restaurant_package, include_restaurant: false)
  options = {
    include: include_restaurant ? ['restaurant'] : []
  }

  Api::V5::RestaurantPackageSerializer.new(restaurant_package, options).serializable_hash
end