class

Nucleoc::Pattern

Inherits Reference < Object

A complete pattern consisting of multiple atoms.

Constructors

new(atoms : Array(Atom))
Source
parse(pattern : String, case_matching : CaseMatching = CaseMatching::Smart, normalization : Normalization = Normalization::Smart) : Pattern
Source

Instance methods

atoms
Source
atoms=(atoms : Array(Atom))
Source
match(matcher : Matcher, haystack : String, indices : Array(Array(UInt32)) | Nil = nil) : UInt16 | Nil

Match this pattern against a haystack. Returns the total score if all atoms match, nil otherwise.

Source