Exception: MappedRecord::CollisionError
- Inherits:
-
MappingError
- Object
- StandardError
- MappingError
- MappedRecord::CollisionError
- Defined in:
- lib/mapped-record.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(mapping_name, key, value, collisions) ⇒ CollisionError
constructor
A new instance of CollisionError.
Constructor Details
#initialize(mapping_name, key, value, collisions) ⇒ CollisionError
Returns a new instance of CollisionError.
42 43 44 45 |
# File 'lib/mapped-record.rb', line 42 def initialize(mapping_name, key, value, collisions) targets = collisions.map { |c| c.first } << key @message = "Collision: #{targets.join(', ')} map to '#{value}'" end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
41 42 43 |
# File 'lib/mapped-record.rb', line 41 def @message end |