lib/demiurge.rb
# This method unregisters a StateItem from the engine. The method
# assumes other items don't refer to the item being
# unregistered. {#unregister_state_item} will try to perform basic
# cleanup, but calling it *can* leave dangling references.
#
# @param [Demiurge::StateItem] item The item to unregister
# @return [void]
# @since 0.0.1
This method unregisters a StateItem from the engine. The method
assumes other items don't refer to the item being
unregistered. {#unregister_state_item} will try to perform basic
cleanup, but calling it *can* leave dangling references.
This method unregisters a StateItem from the engine . The method assumes other items don ' t refer to the item being unregistered . { #unregister_state_item } will try to perform basic cleanup but calling it * can * leave dangling references .
def unregister_state_item(item)
      loc = item.location
      loc.ensure_does_not_contain(item.name)
      zone = item.zone
      zone.ensure_does_not_contain(item.name)
      @state_items.delete(item.name)
      @zones -= [item]
      nil
    end
def unregister_state_item ( item ) loc = item . location loc . ensure_does_not_contain ( item . name ) zone = item . zone zone . ensure_does_not_contain ( item . name ) @state_items . delete ( item . name ) @zones -= [ item ] nil end
This method unregisters a StateItem from the engine.
This method unregisters a StateItem from the engine .
None
void
item
item The item to unregister
item The item to unregister
since
None