Method: Wukong::DriverMethods#construct_dataflow
- Defined in:
- lib/wukong/driver.rb
#construct_dataflow(label, settings = {}) ⇒ Object
Construct a dataflow from the given label and settings.
This method does not cause Processor#setup to be called on any of the processors in the dataflow. Call the #setup_dataflow method to explicitly have setup occur. This distinction is useful for drivers which themselves need to do complex initialization before letting processors in the dataflow initialize.
84 85 86 87 88 89 90 91 |
# File 'lib/wukong/driver.rb', line 84 def construct_dataflow(label, settings={}) self.label = label self.settings = settings prepend(:recordize) if settings[:as] prepend("from_#{settings[:from]}".to_sym) if settings[:from] append("to_#{settings[:to]}".to_sym) if settings[:to] build_dataflow end |