Class: Tarantool::Model::RecordNotFound

Inherits:
Error
  • Object
show all
Defined in:
tarantool-model/lib/tarantool/model/errors.rb

Overview

No row in the storage for this model's primary key.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model, key) ⇒ RecordNotFound

Returns a new instance of RecordNotFound.



11
12
13
14
15
# File 'tarantool-model/lib/tarantool/model/errors.rb', line 11

def initialize(model, key)
  @model = model
  @key = key
  super("#{model.name} with key #{key.inspect} not found")
end

Instance Attribute Details

#key ⇒ Object (readonly)

Returns the value of attribute key.



9
10
11
# File 'tarantool-model/lib/tarantool/model/errors.rb', line 9

def key
  @key
end

#model ⇒ Object (readonly)

Returns the value of attribute model.



9
10
11
# File 'tarantool-model/lib/tarantool/model/errors.rb', line 9

def model
  @model
end