Class: Seatsio::Domain::SocialDistancingRuleset

Inherits:
Object
  • Object
show all
Defined in:
lib/seatsio/domain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_behindObject (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_seatsObject (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_seatsObject (readonly)

Returns the value of attribute enabled_seats.



474
475
476
# File 'lib/seatsio/domain.rb', line 474

def enabled_seats
  @enabled_seats
end

#indexObject (readonly)

Returns the value of attribute index.



474
475
476
# File 'lib/seatsio/domain.rb', line 474

def index
  @index
end

#max_group_sizeObject (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

#nameObject (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_seatsObject (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_sidesObject (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