Closed HuangHuangHuangShiqing closed 3 years ago
if users want to modify value of url or data_source, they don't need to create new object, they just need to use method constructURL or constructDataSource ex: obj = ObjectBuilder.ObjectBuilder() '''object covid with default url and data_source''' covid= ObjectBuilder.Director.contructWholeProduct(obj) '''change covid.data_source to nyt''' ObjectBuilder.Director.constructDataSource(obj,"nyt")
The builder pattern is applied in covid19.py, where the user can set url and data_source separately.