Package pypat :: Package creational :: Module builder :: Class Director
[hide private]
[frames] | no frames]

Class Director

source code


Abstract director class, responsible for using a builder to fully construct an object.

- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
- External Builder Pattern documentation: U{https://en.wikipedia.org/wiki/Builder_pattern}

Instance Methods [hide private]
 
__init__(self)
Initialize a new Director.
source code
 
construct(self)
Abstract method for fully constructing an object.
source code
 
get_constructed_object(self)
Get the object this director is responsible for constructing.
source code
Method Details [hide private]

construct(self)

source code 

Abstract method for fully constructing an object.

Concrete implementations should override this and use a builder to construct the object.

Decorators:
  • @abstractmethod
Raises:
  • NotImplementedError - If this method is not overridden.

get_constructed_object(self)

source code 

Get the object this director is responsible for constructing.

Returns:
The object that this director is responsible for constructing.