Exception: StrokeDB::SlotNotFoundError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/document/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.


17
18
19
# File 'lib/document/document.rb', line 17

def initialize(slotname)
  @slotname = slotname
end

Instance Attribute Details

#slotnameObject (readonly)

Returns the value of attribute slotname.


15
16
17
# File 'lib/document/document.rb', line 15

def slotname
  @slotname
end

Instance Method Details

#inspectObject


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

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

#messageObject


21
22
23
# File 'lib/document/document.rb', line 21

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