module Logit::PatternMatcher

Defined in:

logit/pattern_matcher.cr

Class Method Summary

Class Method Detail

def self.match?(namespace : String, pattern : String) : Bool #

Check if a namespace matches a glob pattern Supports:

  • Exact matching: "MyLib::HTTP" matches "MyLib::HTTP"
  • Single wildcard (): "MyLib::" matches "MyLib::HTTP" but not "MyLib::HTTP::Client"
  • Multi wildcard (): "MyLib::" matches "MyLib::HTTP" and "MyLib::HTTP::Client"

[View source]