Exception: Octoball::MismatchedShards
- Inherits:
-
StandardError
- Object
- StandardError
- Octoball::MismatchedShards
- Defined in:
- lib/octoball/association_shard_check.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.
7 8 9 10 |
# File 'lib/octoball/association_shard_check.rb', line 7 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.
5 6 7 |
# File 'lib/octoball/association_shard_check.rb', line 5 def current_shard @current_shard end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
5 6 7 |
# File 'lib/octoball/association_shard_check.rb', line 5 def record @record end |
Instance Method Details
#message ⇒ Object
12 13 14 |
# File 'lib/octoball/association_shard_check.rb', line 12 def "Association shard mismatch: record shard is \"#{record.current_shard}\" but current shard is \"#{current_shard}\"" end |