Exception: XxxRename::Contract::FileRenameOpValidationFailure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/xxx_rename/contract/file_rename_op_contract.rb

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ FileRenameOpValidationFailure

Returns a new instance of FileRenameOpValidationFailure.

Parameters:

  • errors (Hash)


7
8
9
10
# File 'lib/xxx_rename/contract/file_rename_op_contract.rb', line 7

def initialize(errors)
  @errors = errors
  super(message)
end

Instance Method Details

#messageObject



12
13
14
15
16
# File 'lib/xxx_rename/contract/file_rename_op_contract.rb', line 12

def message
  ers = []
  @errors.each_pair { |code, value| ers << "#{code}: #{value.join(" ")}" }
  ers.join(", ")
end