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
26 27 28 29 30 |
# File 'lib/nats/io/kv/errors.rb', line 26 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.
25 26 27 |
# File 'lib/nats/io/kv/errors.rb', line 25 def entry @entry end |
#op ⇒ Object (readonly)
Returns the value of attribute op.
25 26 27 |
# File 'lib/nats/io/kv/errors.rb', line 25 def op @op end |
Instance Method Details
#to_s ⇒ Object
32 33 34 35 36 |
# File 'lib/nats/io/kv/errors.rb', line 32 def to_s msg = "nats: key not found" msg = "#{msg}: #{@message}" if @message msg end |