Class: BulkProcessor::CSVProcessor::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/bulk_processor/csv_processor/result.rb

Overview

A container for messages generated by processing that need to be passed back to the handler.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(messages:, successful:, row_num: nil, primary_attributes: nil) ⇒ Result

Returns a new instance of Result.



8
9
10
11
12
13
# File 'lib/bulk_processor/csv_processor/result.rb', line 8

def initialize(messages:, successful:, row_num: nil, primary_attributes: nil)
  @messages = messages
  @successful = successful
  @row_num = row_num
  @primary_attributes = primary_attributes
end

Instance Attribute Details

#messagesObject (readonly)

Returns the value of attribute messages.



6
7
8
# File 'lib/bulk_processor/csv_processor/result.rb', line 6

def messages
  @messages
end

#primary_attributesObject (readonly)

Returns the value of attribute primary_attributes.



6
7
8
# File 'lib/bulk_processor/csv_processor/result.rb', line 6

def primary_attributes
  @primary_attributes
end

#row_numObject (readonly)

Returns the value of attribute row_num.



6
7
8
# File 'lib/bulk_processor/csv_processor/result.rb', line 6

def row_num
  @row_num
end

Instance Method Details

#successful?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/bulk_processor/csv_processor/result.rb', line 15

def successful?
  @successful
end