Class: CsvImportMagic::Failure
- Inherits:
-
Object
- Object
- CsvImportMagic::Failure
- Defined in:
- app/services/csv_import_magic/failure.rb
Instance Attribute Summary collapse
-
#csv_parsed ⇒ Object
readonly
Returns the value of attribute csv_parsed.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#importer ⇒ Object
readonly
Returns the value of attribute importer.
-
#report ⇒ Object
readonly
Returns the value of attribute report.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(csv_parsed, importer_id) ⇒ Failure
constructor
A new instance of Failure.
Constructor Details
#initialize(csv_parsed, importer_id) ⇒ Failure
Returns a new instance of Failure.
5 6 7 8 9 10 11 |
# File 'app/services/csv_import_magic/failure.rb', line 5 def initialize(csv_parsed, importer_id) @importer = ::Importer.find(importer_id) @csv_parsed = csv_parsed @report = csv_parsed.report @rows = report.invalid_rows @identifier = csv_parsed.config.identifiers.first end |
Instance Attribute Details
#csv_parsed ⇒ Object (readonly)
Returns the value of attribute csv_parsed.
3 4 5 |
# File 'app/services/csv_import_magic/failure.rb', line 3 def csv_parsed @csv_parsed end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
3 4 5 |
# File 'app/services/csv_import_magic/failure.rb', line 3 def identifier @identifier end |
#importer ⇒ Object (readonly)
Returns the value of attribute importer.
3 4 5 |
# File 'app/services/csv_import_magic/failure.rb', line 3 def importer @importer end |
#report ⇒ Object (readonly)
Returns the value of attribute report.
3 4 5 |
# File 'app/services/csv_import_magic/failure.rb', line 3 def report @report end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
3 4 5 |
# File 'app/services/csv_import_magic/failure.rb', line 3 def rows @rows end |
Instance Method Details
#generate ⇒ Object
13 14 15 16 |
# File 'app/services/csv_import_magic/failure.rb', line 13 def generate set_attachement_error end |