class

Nucleoc::MultiPattern

Inherits Reference < Object

Multi-pattern matching across multiple columns with status tracking.

Constructors

new(columns : Int32)

Creates a multi pattern with columns empty column patterns.

Source

Instance methods

clear

Resets all column patterns to empty.

Source
column_pattern(column : Int32) : Pattern

Returns the pattern for a column.

Source
column_status(column : Int32) : PatternStatus

Returns the status for a column.

Source
columns

Number of columns in this multi pattern.

Source
empty?

Returns true if all column patterns are empty.

Source
mark_unchanged

Marks all columns as unchanged.

Source
needs_rescore?

Returns true if any column needs to be rescored.

Source
needs_update?

Returns true if any column needs to be updated.

Source
reparse(column : Int32, new_text : String, case_matching : CaseMatching = CaseMatching::Smart, normalization : Normalization = Normalization::Smart, append : Bool = false) : Nil

Updates the pattern for a column with new text.

Source
reset_status

Resets all column statuses to Unchanged.

Source
score(haystacks : Array(Utf32String), matcher : Matcher) : UInt16 | Nil

Scores a multi-column haystack against all column patterns. Returns the total score if all columns match, nil otherwise.

Source
status

Returns the overall status (maximum status across all columns).

Source