It has no sense to check if the table has been initialized on every call.... makes code really confusing on my opinion. If os_table is something you need to populate and keep while the live (run) of an instance, use instance variables like @os_table. Initialize them before start data processing and keep them up to date. It should apply to the different tables your module is building.