Class: Pal::Operation::Exporter
Overview
Probably a bad name, its really a processor that calls an export impl - w
Instance Attribute Summary collapse
Instance Method Summary
collapse
#attributes=, #from_hash, #from_json
Methods included from Log
#log_debug, #log_error, #log_info, #log_warn
Instance Attribute Details
23
24
25
|
# File 'lib/pal/operation/exporter.rb', line 23
def actions
@actions
end
|
17
18
19
|
# File 'lib/pal/operation/exporter.rb', line 17
def export_types
@export_types
end
|
#properties ⇒ Array<String>
20
21
22
|
# File 'lib/pal/operation/exporter.rb', line 20
def properties
@properties
end
|
Instance Method Details
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/pal/operation/exporter.rb', line 27
def perform_export(ctx)
log_info("About to extract required data defined in #{ctx.candidates.size} rows")
, extracted_columns = (ctx, @properties)
if @actions&.processable?
log_info("Actions have been defined, going off to extract.")
, extracted_columns = @actions.process(, extracted_columns)
end
@export_types.each do |t|
log_info("Exporting for [#{t.class}] triggered ...")
t.run_export(, extracted_columns)
log_info("... export for [#{t.class}] completed")
end
[, extracted_columns]
end
|