Exception: StrokeDB::SlotNotFoundError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/strokedb/document.rb

Overview

Raised on unexisting document access.

Example:

document.slot_that_does_not_exist_ever

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(slotname) ⇒ SlotNotFoundError

Returns a new instance of SlotNotFoundError.



25
26
27
# File 'lib/strokedb/document.rb', line 25

def initialize(slotname)
  @slotname = slotname
end

Instance Attribute Details

#slotnameObject (readonly)

Returns the value of attribute slotname.



23
24
25
# File 'lib/strokedb/document.rb', line 23

def slotname
  @slotname
end

Instance Method Details

#inspectObject



33
34
35
# File 'lib/strokedb/document.rb', line 33

def inspect
  "#<#{self.class.name}: #{message}>"
end

#messageObject



29
30
31
# File 'lib/strokedb/document.rb', line 29

def message
  "Can't find slot #{@slotname}"
end