Exception: Zoidberg::WeakRef::RecycledException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/zoidberg/weak_ref.rb

Overview

Exception type raised when referenced object no longer exists

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, recycled_object_id) ⇒ self

Create a new exception instance

Parameters:

  • msg (String)

    exception message

  • recycled_object_id (String)

    casted object ID



17
18
19
20
# File 'lib/zoidberg/weak_ref.rb', line 17

def initialize(msg, recycled_object_id)
  @recycled_object_id = recycled_object_id
  super(msg)
end

Instance Attribute Details

#recycled_object_idString (readonly)

Returns ID of referenced object casted to string.

Returns:

  • (String)

    ID of referenced object casted to string



11
12
13
# File 'lib/zoidberg/weak_ref.rb', line 11

def recycled_object_id
  @recycled_object_id
end