Class: CDMDEXER::ETLBySetSpecs
- Inherits:
-
Object
- Object
- CDMDEXER::ETLBySetSpecs
- Defined in:
- lib/cdmdexer/etl_by_set_specs.rb
Instance Attribute Summary collapse
-
#etl_config ⇒ Object
readonly
Returns the value of attribute etl_config.
-
#etl_worker_klass ⇒ Object
readonly
Returns the value of attribute etl_worker_klass.
-
#set_specs ⇒ Object
readonly
Returns the value of attribute set_specs.
Instance Method Summary collapse
-
#initialize(set_specs: [:missing_setspec], etl_config: :missing_etl_config, etl_worker_klass: ETLWorker) ⇒ ETLBySetSpecs
constructor
A new instance of ETLBySetSpecs.
- #run! ⇒ Object
Constructor Details
#initialize(set_specs: [:missing_setspec], etl_config: :missing_etl_config, etl_worker_klass: ETLWorker) ⇒ ETLBySetSpecs
Returns a new instance of ETLBySetSpecs.
4 5 6 7 8 9 10 |
# File 'lib/cdmdexer/etl_by_set_specs.rb', line 4 def initialize(set_specs: [:missing_setspec], etl_config: :missing_etl_config, etl_worker_klass: ETLWorker) @set_specs = set_specs @etl_config = etl_config @etl_worker_klass = etl_worker_klass end |
Instance Attribute Details
#etl_config ⇒ Object (readonly)
Returns the value of attribute etl_config.
3 4 5 |
# File 'lib/cdmdexer/etl_by_set_specs.rb', line 3 def etl_config @etl_config end |
#etl_worker_klass ⇒ Object (readonly)
Returns the value of attribute etl_worker_klass.
3 4 5 |
# File 'lib/cdmdexer/etl_by_set_specs.rb', line 3 def etl_worker_klass @etl_worker_klass end |
#set_specs ⇒ Object (readonly)
Returns the value of attribute set_specs.
3 4 5 |
# File 'lib/cdmdexer/etl_by_set_specs.rb', line 3 def set_specs @set_specs end |
Instance Method Details
#run! ⇒ Object
12 13 14 15 16 |
# File 'lib/cdmdexer/etl_by_set_specs.rb', line 12 def run! set_specs.map do |set_spec| etl_worker_klass.perform_async(etl_config.merge(set_spec: set_spec)) end end |