Class: NATS::KeyValue::KeyNotFoundError
- Defined in:
- lib/nats/io/kv.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
38 39 40 41 42 |
# File 'lib/nats/io/kv.rb', line 38 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.
37 38 39 |
# File 'lib/nats/io/kv.rb', line 37 def entry @entry end |
#op ⇒ Object (readonly)
Returns the value of attribute op.
37 38 39 |
# File 'lib/nats/io/kv.rb', line 37 def op @op end |
Instance Method Details
#to_s ⇒ Object
44 45 46 47 48 |
# File 'lib/nats/io/kv.rb', line 44 def to_s msg = "nats: key not found" msg = "#{msg}: #{@message}" if @message msg end |