rubberduck-vba / examples

Example code from RD News blog articles
MIT License
56 stars 26 forks source link

ImmutabilityAndFactoryPattern/Cars Project - Code Failing #4

Open jdcortez5 opened 4 years ago

jdcortez5 commented 4 years ago

There is two typos on the function below in the AbstractFactoryExample Module.

Private Function CreateSomeHondaCars(ByVal factory As ISimplerCarFactory) As Collection
'NOTE: this function doesn't know or care what specific ISimplerCarFactory it's working with.
    Dim cars As Collection
    Set cars = New Collection
    cars.Add factory.Create("Civic")
    cars.Add factory.Create("Accord")
    cars.Add factory.Create("CRV")
    Set CreateSomeCars = Collection 'should read Set CreateSomeHondaCars = cars
End Function
retailcoder commented 4 years ago

Thanks for the heads up! I won't be able to do this for a few days, feel free to PR in the meantime!