Class: RedisClient::Cluster::ErrorCollection
- Inherits:
-
Error
- Object
- Error
- RedisClient::Cluster::ErrorCollection
- Defined in:
- lib/redis_client/cluster/errors.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors) ⇒ ErrorCollection
constructor
A new instance of ErrorCollection.
Constructor Details
#initialize(errors) ⇒ ErrorCollection
Returns a new instance of ErrorCollection.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/redis_client/cluster/errors.rb', line 30 def initialize(errors) @errors = {} if !errors.is_a?(Hash) || errors.empty? super('') return end @errors = errors = @errors.map { |node_key, error| "#{node_key}: #{error.}" } super("Errors occurred on any node: #{.join(', ')}") end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
28 29 30 |
# File 'lib/redis_client/cluster/errors.rb', line 28 def errors @errors end |