Module: Lich::Common::Watchable

Included in:
PostLoad, DragonRealms::DRInfomon, Gemstone::ActiveSpell, Gemstone::Infomon
Defined in:
documented/common/watchable.rb

Overview

Watchable module provides a common interface for self-watching modules that manage their own lifecycle through background threads.

Modules that include Watchable must implement a .watch! class method that spawns a background thread to monitor conditions and trigger initialization when ready.

See Also:

Instance Method Summary collapse

Instance Method Details

#watch!Object

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.

Raises a NotImplementedError if the .watch! method is not implemented.

Raises:

  • (NotImplementedError)

    if the method is not implemented by the including module



30
31
32
# File 'documented/common/watchable.rb', line 30

def watch!
  raise NotImplementedError, "#{self.name} must implement .watch! to use Watchable"
end