Class: Makara::Errors::InvalidShard

Inherits:
MakaraError
  • Object
show all
Defined in:
lib/makara/errors/invalid_shard.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(role, shard_id) ⇒ InvalidShard

Returns a new instance of InvalidShard.



7
8
9
10
11
# File 'lib/makara/errors/invalid_shard.rb', line 7

def initialize(role, shard_id)
  @role = role
  @shard_id = shard_id
  super "[Makara] Invalid shard_id #{shard_id} for the #{role} pool"
end

Instance Attribute Details

#roleObject (readonly)

Returns the value of attribute role.



4
5
6
# File 'lib/makara/errors/invalid_shard.rb', line 4

def role
  @role
end

#shard_idObject (readonly)

Returns the value of attribute shard_id.



5
6
7
# File 'lib/makara/errors/invalid_shard.rb', line 5

def shard_id
  @shard_id
end