module SheepAst::RegexMatchUtil
Regex match utility
@api private
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/sheep_ast/match/regex_match.rb, line 64 def initialize @regex_matches = {} @global_matches[MatchKind::Regex.rank] = @regex_matches @methods_array << prio(300, method(:check_regex_match)) super() end
Public Instance Methods
check_regex_match(data)
click to toggle source
# File lib/sheep_ast/match/regex_match.rb, line 74 def check_regex_match(data) @regex_matches.each do |_, a_chain| test = a_chain.match(data) next if test.nil? a_chain.matched(data) # a_chain.matched_end(data) return a_chain end return nil end