schedule_item and schedule_todo were specific to the original intention of this code. We should take those out. I think the main thing this changes is adding an event_start attribute to schedule.
It might be also worth while to move code into three separate files in order to help clean things up / make them easier to test.
event_scheduler - This would have the API's that a user should be interacting with
schedule_decoder - Methods that are just for translating the database information to Ruby specific entities
schedule_math - This would be the methods that are doing the specific math required to figure out next events.
I'm up for other naming methods and/or a different structure. Let's discuss here.
schedule_item
andschedule_todo
were specific to the original intention of this code. We should take those out. I think the main thing this changes is adding anevent_start
attribute toschedule
.It might be also worth while to move code into three separate files in order to help clean things up / make them easier to test.
event_scheduler
- This would have the API's that a user should be interacting withschedule_decoder
- Methods that are just for translating the database information to Ruby specific entitiesschedule_math
- This would be the methods that are doing the specific math required to figure out next events.I'm up for other naming methods and/or a different structure. Let's discuss here.