Exception: MassEncryption::BatchEncryptionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mass_encryption/batch_encryption_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors_by_record) ⇒ BatchEncryptionError

Returns a new instance of BatchEncryptionError.



4
5
6
7
8
# File 'lib/mass_encryption/batch_encryption_error.rb', line 4

def initialize(errors_by_record)
  @errors_by_record = errors_by_record
  message = errors_by_record.collect { |record, error| "[#{record.class}:#{record.id}] #{error.inspect}" }.join(", ")
  super(message)
end

Instance Attribute Details

#errors_by_recordObject (readonly)

Returns the value of attribute errors_by_record.



2
3
4
# File 'lib/mass_encryption/batch_encryption_error.rb', line 2

def errors_by_record
  @errors_by_record
end