Exception: Octopus::AssociationShardTracking::MismatchedShards
- Inherits:
-
StandardError
- Object
- StandardError
- Octopus::AssociationShardTracking::MismatchedShards
- Defined in:
- lib/octopus/association_shard_tracking.rb
Instance Attribute Summary collapse
-
#current_shard ⇒ Object
readonly
Returns the value of attribute current_shard.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record, current_shard) ⇒ MismatchedShards
constructor
A new instance of MismatchedShards.
- #message ⇒ Object
Constructor Details
#initialize(record, current_shard) ⇒ MismatchedShards
Returns a new instance of MismatchedShards.
6 7 8 9 |
# File 'lib/octopus/association_shard_tracking.rb', line 6 def initialize(record, current_shard) @record = record @current_shard = current_shard end |
Instance Attribute Details
#current_shard ⇒ Object (readonly)
Returns the value of attribute current_shard.
4 5 6 |
# File 'lib/octopus/association_shard_tracking.rb', line 4 def current_shard @current_shard end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
4 5 6 |
# File 'lib/octopus/association_shard_tracking.rb', line 4 def record @record end |
Instance Method Details
#message ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/octopus/association_shard_tracking.rb', line 11 def [ "Association Error: Records are from different shards", "Record: #{record.inspect}", "Current Shard: #{current_shard.inspect}", "Current Record Shard: #{record.current_shard.inspect}", ].join(" ") end |