Class: OffTheGridTrucks::DetailedEvent
- Defined in:
- lib/off_the_grid_trucks/detailed_event.rb
Instance Attribute Summary collapse
-
#community_activations ⇒ Object
readonly
Returns the value of attribute community_activations.
-
#entertainments ⇒ Object
readonly
Returns the value of attribute entertainments.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#location_details ⇒ Object
readonly
Returns the value of attribute location_details.
-
#meal_type ⇒ Object
readonly
Returns the value of attribute meal_type.
-
#services ⇒ Object
readonly
Returns the value of attribute services.
Attributes inherited from Event
#assigned_vendors, #end_time, #id, #is_featured, #location_id, #location_name, #name, #number_of_assigned_vendors, #start_time
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ DetailedEvent
constructor
A new instance of DetailedEvent.
Constructor Details
#initialize(args) ⇒ DetailedEvent
Returns a new instance of DetailedEvent.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/off_the_grid_trucks/detailed_event.rb', line 12 def initialize(args) super(args) @meal_type = args.fetch('mealType') {} @location = Location.new(args.fetch('location') {}) @location_details = args.fetch('locationDetails') {} @services = args.fetch('services') {}.map { |service| Service.new(service) } @community_activations = args.fetch('communityActivations') {} @entertainments = args.fetch('entertainments') {} end |
Instance Attribute Details
#community_activations ⇒ Object (readonly)
Returns the value of attribute community_activations.
9 10 11 |
# File 'lib/off_the_grid_trucks/detailed_event.rb', line 9 def community_activations @community_activations end |
#entertainments ⇒ Object (readonly)
Returns the value of attribute entertainments.
9 10 11 |
# File 'lib/off_the_grid_trucks/detailed_event.rb', line 9 def entertainments @entertainments end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
9 10 11 |
# File 'lib/off_the_grid_trucks/detailed_event.rb', line 9 def location @location end |
#location_details ⇒ Object (readonly)
Returns the value of attribute location_details.
9 10 11 |
# File 'lib/off_the_grid_trucks/detailed_event.rb', line 9 def location_details @location_details end |
#meal_type ⇒ Object (readonly)
Returns the value of attribute meal_type.
9 10 11 |
# File 'lib/off_the_grid_trucks/detailed_event.rb', line 9 def meal_type @meal_type end |
#services ⇒ Object (readonly)
Returns the value of attribute services.
9 10 11 |
# File 'lib/off_the_grid_trucks/detailed_event.rb', line 9 def services @services end |