Definition at line 80 of file Lens.py.
◆ of()
"Camera[T]" selfie_lib.Lens.Camera.of |
( |
Callable[[T], Snapshot] |
lambda_func | ) |
|
|
static |
Definition at line 95 of file Lens.py.
95 def of(lambda_func: Callable[[T], Snapshot]) -> "Camera[T]":
96 class LambdaCamera(Camera):
97 def snapshot(self, subject: T) -> Snapshot:
98 return lambda_func(subject)
99
100 return LambdaCamera()
◆ snapshot()
Snapshot selfie_lib.Lens.Camera.snapshot |
( |
|
self, |
|
|
T |
subject |
|
) |
| |
Definition at line 82 of file Lens.py.
82 def snapshot(self, subject: T) -> Snapshot:
83 pass
84
◆ with_lens()
"Camera[T]" selfie_lib.Lens.Camera.with_lens |
( |
|
self, |
|
|
Lens |
lens |
|
) |
| |
Definition at line 85 of file Lens.py.
85 def with_lens(self, lens: Lens) -> "Camera[T]":
86 parent = self
87
88 class WithLensCamera(Camera):
89 def snapshot(self, subject: T) -> Snapshot:
90 return lens(parent.snapshot(subject))
91
92 return WithLensCamera()
93
The documentation for this class was generated from the following file: