Class: Availabiliter::AvailabilitiesCalculator
- Inherits:
-
Object
- Object
- Availabiliter::AvailabilitiesCalculator
- Defined in:
- lib/availabiliter/availabilities_calculator.rb
Overview
Centralize and orchestrate all behavior for availabilities calculations
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#maximum_availability_end ⇒ Object
readonly
Returns the value of attribute maximum_availability_end.
-
#minimum_availability_start ⇒ Object
readonly
Returns the value of attribute minimum_availability_start.
-
#raw_time_slots ⇒ Object
readonly
Returns the value of attribute raw_time_slots.
-
#time_zone ⇒ Object
readonly
Returns the value of attribute time_zone.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(raw_time_slots, minimum_availability_start:, maximum_availability_end:, format:, time_zone:) ⇒ AvailabilitiesCalculator
constructor
A new instance of AvailabilitiesCalculator.
Constructor Details
#initialize(raw_time_slots, minimum_availability_start:, maximum_availability_end:, format:, time_zone:) ⇒ AvailabilitiesCalculator
Returns a new instance of AvailabilitiesCalculator.
10 11 12 13 14 15 16 |
# File 'lib/availabiliter/availabilities_calculator.rb', line 10 def initialize(raw_time_slots, minimum_availability_start:, maximum_availability_end:, format:, time_zone:) @raw_time_slots = raw_time_slots @minimum_availability_start = minimum_availability_start @maximum_availability_end = maximum_availability_end @format = format @time_zone = time_zone end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
8 9 10 |
# File 'lib/availabiliter/availabilities_calculator.rb', line 8 def format @format end |
#maximum_availability_end ⇒ Object (readonly)
Returns the value of attribute maximum_availability_end.
8 9 10 |
# File 'lib/availabiliter/availabilities_calculator.rb', line 8 def maximum_availability_end @maximum_availability_end end |
#minimum_availability_start ⇒ Object (readonly)
Returns the value of attribute minimum_availability_start.
8 9 10 |
# File 'lib/availabiliter/availabilities_calculator.rb', line 8 def minimum_availability_start @minimum_availability_start end |
#raw_time_slots ⇒ Object (readonly)
Returns the value of attribute raw_time_slots.
8 9 10 |
# File 'lib/availabiliter/availabilities_calculator.rb', line 8 def raw_time_slots @raw_time_slots end |
#time_zone ⇒ Object (readonly)
Returns the value of attribute time_zone.
8 9 10 |
# File 'lib/availabiliter/availabilities_calculator.rb', line 8 def time_zone @time_zone end |
Instance Method Details
#call ⇒ Object
18 19 20 |
# File 'lib/availabiliter/availabilities_calculator.rb', line 18 def call output_availabilities end |