Class: Slot

Inherits:
Object
  • Object
show all
Defined in:
app/models/slot.rb

Overview

The Slot in the agenda of the service Provider in which they are available for Customers to book.

Instance Attribute Summary (collapse)

Instance Attribute Details

- (Array<Booking>) bookings

Returns the Bookings associated with this Slot.

Returns:



18
19
20
# File 'app/models/slot.rb', line 18

def bookings
  @bookings
end

- (Integer) capacity

Returns the amount of Customers that can book this Slot.

Returns:

  • (Integer)

    the amount of Customers that can book this Slot.



5
6
7
# File 'app/models/slot.rb', line 5

def capacity
  @capacity
end

- (Integer) min_lenght

Returns the minimum lenght in minutes of time a Customer can book within this Slot.

Can't be greater than the lenght of the Period associated with the Slot.

Returns:

  • (Integer)

    the minimum lenght in minutes of time a Customer can book within this Slot.

    Can't be greater than the lenght of the Period associated with the Slot.



12
13
14
# File 'app/models/slot.rb', line 12

def min_lenght
  @min_lenght
end

- (Period) period

Returns the Period that this Slot comprehend.

Returns:



15
16
17
# File 'app/models/slot.rb', line 15

def period
  @period
end