Class: Ductr::ETL::FiberControl
- Inherits:
-
Object
- Object
- Ductr::ETL::FiberControl
- Extended by:
- Forwardable
- Defined in:
- lib/ductr/etl/fiber_control.rb
Overview
Glues ETL controls and the associated fibers together.
Instance Attribute Summary collapse
-
#control ⇒ Control
readonly
The ETL control instance.
-
#right ⇒ Array<FiberControl>
The next fiber controls.
Instance Method Summary collapse
-
#fiber ⇒ Fiber
Memoizes the fiber to be associated with the ETL control based on its type.
-
#initialize(control, type:) ⇒ FiberControl
constructor
Creates a new fiber control with the given control and control type.
-
#resume ⇒ void
Resumes the control’s fiber.
Constructor Details
#initialize(control, type:) ⇒ FiberControl
Creates a new fiber control with the given control and control type.
29 30 31 32 33 34 |
# File 'lib/ductr/etl/fiber_control.rb', line 29 def initialize(control, type:) @control = control @type = type @right = [] end |
Instance Attribute Details
#control ⇒ Control (readonly)
Returns The ETL control instance.
21 22 23 |
# File 'lib/ductr/etl/fiber_control.rb', line 21 def control @control end |
#right ⇒ Array<FiberControl>
Returns The next fiber controls.
19 20 21 |
# File 'lib/ductr/etl/fiber_control.rb', line 19 def right @right end |
Instance Method Details
#fiber ⇒ Fiber
Memoizes the fiber to be associated with the ETL control based on its type.
41 42 43 |
# File 'lib/ductr/etl/fiber_control.rb', line 41 def fiber @fiber ||= send(@type) end |
#resume ⇒ void
This method returns an undefined value.
Resumes the control’s fiber.
16 |
# File 'lib/ductr/etl/fiber_control.rb', line 16 def_delegators :fiber, :resume |