module SheepAst::ExactMatchUtil

to include exact match util @api private

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/sheep_ast/match/exact_match.rb, line 63
def initialize
  super()
  @exact_matches = {}
  @global_matches[MatchKind::Exact.rank] = @exact_matches
  @methods_array << prio(100, method(:check_exact_match))
end

Public Instance Methods

check_exact_match(data) click to toggle source
# File lib/sheep_ast/match/exact_match.rb, line 73
def check_exact_match(data)
  key = data.expr

  match = @exact_matches[key]

  return nil if match.nil?

  match.init
  match.matched(data)
  # match.matched_end(data)
  return match
end