You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the first example is considered that the method(createObject) of the decorator(concreteCreatorA) will overwrite the method with the same name of the decoratee(creator)
[] > creator
# left to be redefined
[] > createObject
# operation over products
[] > performOperation
createObject.getWeight.plus 1 > @
[] > concreteCreatorA
creator > @
[] > createObject
productA > @
[] > concreteCreatorB
creator > @
[] > createObject
productB > @
[] > productA
# let's suppose that this implementation
# gets value from the production server
[] > getWeight
42 > @
[] > productB
# let's suppose that this implementation
# gets value from the testing server
[] > getWeight
24 > @
Full examples can be found in the paragraph 6.12
The text was updated successfully, but these errors were encountered:
In the first example is considered that the method(
createObject
) of the decorator(concreteCreatorA
) will overwrite the method with the same name of the decoratee(creator
)Full examples can be found in the paragraph 6.12
The text was updated successfully, but these errors were encountered: