Class: Lich::Gemstone::Combat::Definitions::Table

Inherits:
Struct
  • Object
show all
Defined in:
documented/gemstone/combat/defs/pattern_gate.rb

Overview

One assembled pattern table: the flattened lookup rows (pattern first, then whatever the def kind carries) together with the PatternGate derived from them. Each def module binds one of these to a constant in a SINGLE assignment and its consumers read that constant once per call, so a hot reload (;hmr combat/defs/, Tracker.reload_defs!) never pairs a lookup from one build with a gate from another, and a load that fails part-way leaves the previous complete table live.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#always_scan ⇒ Object

Returns the value of attribute always_scan

Returns:

  • (Object) —

    the current value of always_scan



46
47
48
# File 'documented/gemstone/combat/defs/pattern_gate.rb', line 46

def always_scan
  @always_scan
end

#gate ⇒ Object

Returns the value of attribute gate

Returns:

  • (Object) —

    the current value of gate



46
47
48
# File 'documented/gemstone/combat/defs/pattern_gate.rb', line 46

def gate
  @gate
end

#lookup ⇒ Object

Returns the value of attribute lookup

Returns:

  • (Object) —

    the current value of lookup



46
47
48
# File 'documented/gemstone/combat/defs/pattern_gate.rb', line 46

def lookup
  @lookup
end

Instance Method Details

#rejects?(line) ⇒ Boolean

True when the line cannot match any pattern in this table.

Returns:

  • (Boolean)


48
# File 'documented/gemstone/combat/defs/pattern_gate.rb', line 48

def rejects?(line) = PatternGate.rejects?(gate, always_scan, line)