Class: Seatsio::Domain::SocialDistancingRuleset
- Inherits:
-
Object
- Object
- Seatsio::Domain::SocialDistancingRuleset
- Defined in:
- lib/seatsio/domain.rb
Instance Attribute Summary collapse
-
#disable_seats_in_front_and_behind ⇒ Object
readonly
Returns the value of attribute disable_seats_in_front_and_behind.
-
#disabled_seats ⇒ Object
readonly
Returns the value of attribute disabled_seats.
-
#enabled_seats ⇒ Object
readonly
Returns the value of attribute enabled_seats.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#max_group_size ⇒ Object
readonly
Returns the value of attribute max_group_size.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#number_of_disabled_aisle_seats ⇒ Object
readonly
Returns the value of attribute number_of_disabled_aisle_seats.
-
#number_of_disabled_seats_to_the_sides ⇒ Object
readonly
Returns the value of attribute number_of_disabled_seats_to_the_sides.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, number_of_disabled_seats_to_the_sides = 0, disable_seats_in_front_and_behind = false, number_of_disabled_aisle_seats = 0, max_group_size = 0, disabled_seats = [], enabled_seats = [], index = 0) ⇒ SocialDistancingRuleset
constructor
A new instance of SocialDistancingRuleset.
Constructor Details
#initialize(name, number_of_disabled_seats_to_the_sides = 0, disable_seats_in_front_and_behind = false, number_of_disabled_aisle_seats = 0, max_group_size = 0, disabled_seats = [], enabled_seats = [], index = 0) ⇒ SocialDistancingRuleset
Returns a new instance of SocialDistancingRuleset.
477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/seatsio/domain.rb', line 477 def initialize(name, number_of_disabled_seats_to_the_sides = 0, disable_seats_in_front_and_behind = false, number_of_disabled_aisle_seats = 0, max_group_size = 0, disabled_seats = [], enabled_seats = [], index = 0) @name = name @number_of_disabled_seats_to_the_sides = number_of_disabled_seats_to_the_sides @disable_seats_in_front_and_behind = disable_seats_in_front_and_behind @number_of_disabled_aisle_seats = number_of_disabled_aisle_seats @max_group_size = max_group_size @disabled_seats = disabled_seats @enabled_seats = enabled_seats @index = index end |
Instance Attribute Details
#disable_seats_in_front_and_behind ⇒ Object (readonly)
Returns the value of attribute disable_seats_in_front_and_behind.
474 475 476 |
# File 'lib/seatsio/domain.rb', line 474 def disable_seats_in_front_and_behind @disable_seats_in_front_and_behind end |
#disabled_seats ⇒ Object (readonly)
Returns the value of attribute disabled_seats.
474 475 476 |
# File 'lib/seatsio/domain.rb', line 474 def disabled_seats @disabled_seats end |
#enabled_seats ⇒ Object (readonly)
Returns the value of attribute enabled_seats.
474 475 476 |
# File 'lib/seatsio/domain.rb', line 474 def enabled_seats @enabled_seats end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
474 475 476 |
# File 'lib/seatsio/domain.rb', line 474 def index @index end |
#max_group_size ⇒ Object (readonly)
Returns the value of attribute max_group_size.
474 475 476 |
# File 'lib/seatsio/domain.rb', line 474 def max_group_size @max_group_size end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
474 475 476 |
# File 'lib/seatsio/domain.rb', line 474 def name @name end |
#number_of_disabled_aisle_seats ⇒ Object (readonly)
Returns the value of attribute number_of_disabled_aisle_seats.
474 475 476 |
# File 'lib/seatsio/domain.rb', line 474 def number_of_disabled_aisle_seats @number_of_disabled_aisle_seats end |
#number_of_disabled_seats_to_the_sides ⇒ Object (readonly)
Returns the value of attribute number_of_disabled_seats_to_the_sides.
474 475 476 |
# File 'lib/seatsio/domain.rb', line 474 def number_of_disabled_seats_to_the_sides @number_of_disabled_seats_to_the_sides end |
Instance Method Details
#==(other) ⇒ Object
489 490 491 492 493 494 495 496 497 498 |
# File 'lib/seatsio/domain.rb', line 489 def == (other) self.name == other.name && self.number_of_disabled_seats_to_the_sides == other.number_of_disabled_seats_to_the_sides && self.disable_seats_in_front_and_behind == other.disable_seats_in_front_and_behind && self.number_of_disabled_aisle_seats == other.number_of_disabled_aisle_seats && self.max_group_size == other.max_group_size && self.disabled_seats == other.disabled_seats && self.enabled_seats == other.enabled_seats && self.index == other.index end |