Class: SocialFramework::ScheduleHelper::ScheduleContext
- Inherits:
-
Object
- Object
- SocialFramework::ScheduleHelper::ScheduleContext
- Defined in:
- app/helpers/social_framework/schedule_helper.rb
Overview
Used to define the ScheduleStrategy class
Instance Method Summary collapse
-
#initialize(schedule_strategy = ScheduleStrategyDefault, elements_factory = ElementsFactoryDefault, max_duration = SocialFramework.max_duration_to_schedule_graph) ⇒ ScheduleContext
constructor
Initialize the ScheduleStrategy class.
-
#verify_availabilities(users, start_day, finish_day, start_hour = Time.parse("00:00"), finish_hour = Time.parse("23:59"), slots_size = SocialFramework.slots_size) ⇒ Object
Build slots to verify availabilities.
Constructor Details
#initialize(schedule_strategy = ScheduleStrategyDefault, elements_factory = ElementsFactoryDefault, max_duration = SocialFramework.max_duration_to_schedule_graph) ⇒ ScheduleContext
Initialize the ScheduleStrategy class
186 187 188 189 |
# File 'app/helpers/social_framework/schedule_helper.rb', line 186 def initialize(schedule_strategy = ScheduleStrategyDefault, elements_factory = ElementsFactoryDefault, max_duration = SocialFramework.max_duration_to_schedule_graph) @strategy = schedule_strategy.new(elements_factory, max_duration) end |
Instance Method Details
#verify_availabilities(users, start_day, finish_day, start_hour = Time.parse("00:00"), finish_hour = Time.parse("23:59"), slots_size = SocialFramework.slots_size) ⇒ Object
Build slots to verify availabilities
192 193 194 195 196 |
# File 'app/helpers/social_framework/schedule_helper.rb', line 192 def verify_availabilities(users, start_day, finish_day, start_hour = Time.parse("00:00"), finish_hour = Time.parse("23:59"), slots_size = SocialFramework.slots_size) @strategy.verify_availabilities(users, start_day, finish_day, start_hour, finish_hour, slots_size) end |