Class: QuickTravel::ProductType

Inherits:
Adapter
  • Object
show all
Defined in:
lib/quick_travel/mock.rb,
lib/quick_travel/product_type.rb

Instance Method Summary collapse

Methods inherited from Adapter

all, belongs_to, create, find, has_many, #to_s, update

Methods included from InitFromHash

#define_readers, #initialize, #to_hash

Instance Method Details

#needs_passengersObject



13
14
15
16
# File 'lib/quick_travel/mock.rb', line 13

def needs_passengers
  return true if @needs_passengers.nil?
  @needs_passengers
end

#resource_categoriesObject



12
13
14
# File 'lib/quick_travel/product_type.rb', line 12

def resource_categories
  ResourceCategory.all(product_type_ids: [id])
end

#routesObject



8
9
10
# File 'lib/quick_travel/product_type.rb', line 8

def routes
  Route.all(id)
end