Exception: StateOfTheNation::ConflictError
- Inherits:
-
StandardError
- Object
- StandardError
- StateOfTheNation::ConflictError
- Defined in:
- lib/state_of_the_nation/errors/conflict_error.rb
Instance Method Summary collapse
-
#initialize(record, conflicting_records) ⇒ ConflictError
constructor
A new instance of ConflictError.
Constructor Details
#initialize(record, conflicting_records) ⇒ ConflictError
Returns a new instance of ConflictError.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/state_of_the_nation/errors/conflict_error.rb', line 3 def initialize(record, conflicting_records) super(<<-MSG.strip_heredoc) Attempted to commit record #{record.inspect} But encountered a conflict with timestamps on the following records #{conflicting_records.map { |record| "- #{record.inspect}" }.join("\n")} MSG end |