2016-10-19 20:20:36 +03:00
|
|
|
"""Dependency injection example, cars module."""
|
|
|
|
|
|
|
|
|
|
|
|
class Car(object):
|
|
|
|
"""Example car."""
|
|
|
|
|
|
|
|
def __init__(self, engine):
|
2020-01-26 22:22:43 +03:00
|
|
|
"""Initialize instance."""
|
2016-10-19 20:20:36 +03:00
|
|
|
self._engine = engine # Engine is injected
|