class Fingers::Hinter

Defined in:

fingers/hinter.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(input : Array(String), width : Int32, state : Fingers::State, output : Printer, patterns : Array(String) = Fingers.config.patterns, alphabet : Array(String) = Fingers.config.alphabet, huffman : Huffman = Huffman.new, formatter : Fingers::Formatter = ::Fingers::MatchFormatter.new, reuse_hints : Bool = false) #

[View source]

Instance Method Detail

def build_target(text, hint, offset) #

[View source]
def capture_indices : Array(Int32) #

[View source]
def count_matches #

[View source]
def count_unique_matches #

[View source]
def find_capture_offset(match : Regex::MatchData) : Tuple(Int32, Int32) | Nil #

[View source]
def hint_for_text(text) #

[View source]
def hints : Array(String) #

[View source]
def lookup(hint) : Target | Nil #

[View source]
def n_matches : Int32 #

[View source]
def pattern : Regex #

[View source]
def pop_hint! : String #

[View source]
def process_line(line, line_index, ending) #

[View source]
def regenerate_hints! #

[View source]
def relative_capture_offset_for_match(match, captured_text) #

[View source]
def replace(match, line_index) #

[View source]
def run #

[View source]