Class: NATS::KeyValue::KeyNotFoundError
- Defined in:
- lib/nats/io/kv/errors.rb
Overview
When a key is not found.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
-
#op ⇒ Object
readonly
Returns the value of attribute op.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ KeyNotFoundError
constructor
A new instance of KeyNotFoundError.
- #to_s ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ KeyNotFoundError
Returns a new instance of KeyNotFoundError.
24 25 26 27 28 |
# File 'lib/nats/io/kv/errors.rb', line 24 def initialize(params={}) @entry = params[:entry] @op = params[:op] @message = params[:message] end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
23 24 25 |
# File 'lib/nats/io/kv/errors.rb', line 23 def entry @entry end |
#op ⇒ Object (readonly)
Returns the value of attribute op.
23 24 25 |
# File 'lib/nats/io/kv/errors.rb', line 23 def op @op end |
Instance Method Details
#to_s ⇒ Object
30 31 32 33 34 |
# File 'lib/nats/io/kv/errors.rb', line 30 def to_s msg = "nats: key not found" msg = "#{msg}: #{@message}" if @message msg end |