Exception: Familia::KeyNotFoundError

Inherits:
NonUniqueKey show all
Defined in:
lib/familia/errors.rb

Overview

Raised when attempting to refresh an object whose key doesn't exist in the database

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ KeyNotFoundError

Returns a new instance of KeyNotFoundError.



232
233
234
235
# File 'lib/familia/errors.rb', line 232

def initialize(key)
  @key = key
  super
end

Instance Attribute Details

#key ⇒ Object (readonly)

Returns the value of attribute key.



230
231
232
# File 'lib/familia/errors.rb', line 230

def key
  @key
end

Instance Method Details

#message ⇒ Object



237
238
239
# File 'lib/familia/errors.rb', line 237

def message
  "Key not found: #{key}"
end