Class: Etna::Clients::Magma::RowBase
- Inherits:
-
Object
- Object
- Etna::Clients::Magma::RowBase
show all
- Defined in:
- lib/etna/clients/magma/workflows/update_attributes_from_csv_workflow.rb
Instance Method Summary
collapse
Instance Method Details
#attribute_is_json?(attribute) ⇒ Boolean
#nil_or_empty?(value) ⇒ Boolean
72
73
74
|
# File 'lib/etna/clients/magma/workflows/update_attributes_from_csv_workflow.rb', line 72
def nil_or_empty?(value)
value.nil? || value.empty?
end
|
#stripped_value(attribute, attribute_value) ⇒ Object
61
62
63
64
65
66
67
68
69
70
|
# File 'lib/etna/clients/magma/workflows/update_attributes_from_csv_workflow.rb', line 61
def stripped_value(attribute, attribute_value)
attribute_value = attribute_value&.strip
if attribute_value &&
( @workflow.json_values || attribute_is_json?(attribute) ) &&
attribute_value != @workflow.hole_value
attribute_value = JSON.parse(attribute_value)
end
attribute_value
end
|