Class: Seatsio::Chart
- Inherits:
-
Object
- Object
- Seatsio::Chart
- Defined in:
- lib/seatsio/domain.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#archived ⇒ Object
readonly
Returns the value of attribute archived.
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#draft_version_thumbnail_url ⇒ Object
readonly
Returns the value of attribute draft_version_thumbnail_url.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#published_version_thumbnail_url ⇒ Object
readonly
Returns the value of attribute published_version_thumbnail_url.
-
#social_distancing_rulesets ⇒ Object
readonly
Returns the value of attribute social_distancing_rulesets.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#validation ⇒ Object
readonly
Returns the value of attribute validation.
Instance Method Summary collapse
-
#initialize(data) ⇒ Chart
constructor
A new instance of Chart.
Constructor Details
#initialize(data) ⇒ Chart
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/seatsio/domain.rb', line 13 def initialize(data) @id = data['id'] @key = data['key'] @status = data['status'] @name = data['name'] @published_version_thumbnail_url = data['publishedVersionThumbnailUrl'] @draft_version_thumbnail_url = data['draftVersionThumbnailUrl'] @events = Event.create_list(data['events']) if data['events'] = data['tags'] @archived = data['archived'] @validation = data['validation'] = data['socialDistancingRulesets'].map { |key, r| [key, SocialDistancingRuleset.new(r['name'], number_of_disabled_seats_to_the_sides: r['numberOfDisabledSeatsToTheSides'], disable_seats_in_front_and_behind: r['disableSeatsInFrontAndBehind'], disable_diagonal_seats_in_front_and_behind: r['disableDiagonalSeatsInFrontAndBehind'], number_of_disabled_aisle_seats: r['numberOfDisabledAisleSeats'], max_group_size: r['maxGroupSize'], max_occupancy_absolute: r['maxOccupancyAbsolute'], max_occupancy_percentage: r['maxOccupancyPercentage'], one_group_per_table: r['oneGroupPerTable'], fixed_group_layout: r['fixedGroupLayout'], disabled_seats: r['disabledSeats'], enabled_seats: r['enabledSeats'], index: r['index'])] }.to_h end |
Instance Attribute Details
#archived ⇒ Object (readonly)
Returns the value of attribute archived.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def archived @archived end |
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def categories @categories end |
#draft_version_thumbnail_url ⇒ Object (readonly)
Returns the value of attribute draft_version_thumbnail_url.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def draft_version_thumbnail_url @draft_version_thumbnail_url end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def events @events end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def name @name end |
#published_version_thumbnail_url ⇒ Object (readonly)
Returns the value of attribute published_version_thumbnail_url.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def published_version_thumbnail_url @published_version_thumbnail_url end |
#social_distancing_rulesets ⇒ Object (readonly)
Returns the value of attribute social_distancing_rulesets.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def status @status end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def end |
#validation ⇒ Object (readonly)
Returns the value of attribute validation.
9 10 11 |
# File 'lib/seatsio/domain.rb', line 9 def validation @validation end |