Class: Lich::Common::DownstreamHook Private

Inherits:
Object
  • Object
show all
Extended by:
HookRegistry
Defined in:
documented/common/downstreamhook.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Registry of hooks that process server strings as they arrive from the game.

DownstreamHook instances intercept and transform strings received from the game server before they are delivered to scripts and the UI. Hooks are executed in registration order and may modify, filter, or pass through the server string unchanged. Script-scoped hooks are automatically removed when their owning script dies; persistent hooks remain.

Class Method Summary collapse

Methods included from HookRegistry

add, cleanup_on_death, hook_sources, list, remove, sources

Class Method Details

._hook_ownersHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the per-class storage mapping hook IDs to their owning script object IDs.

Returns:

  • (Hash)

    a hash keyed by hook ID



44
45
46
# File 'documented/common/downstreamhook.rb', line 44

def self._hook_owners
  @@downstream_hook_owners
end

._hook_persistHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the per-class storage mapping hook IDs to their persistence flags.

Returns:

  • (Hash)

    a hash keyed by hook ID, with boolean values indicating whether each hook persists across script death



52
53
54
# File 'documented/common/downstreamhook.rb', line 52

def self._hook_persist
  @@downstream_hook_persist
end

._hook_sourcesHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the per-class storage mapping hook IDs to their source files.

Returns:

  • (Hash)

    a hash keyed by hook ID



36
37
38
# File 'documented/common/downstreamhook.rb', line 36

def self._hook_sources
  @@downstream_hook_sources
end

._hooksObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Per-class storage for the shared HookRegistry methods.



28
29
30
# File 'documented/common/downstreamhook.rb', line 28

def self._hooks
  @@downstream_hooks
end