class Metamorpher::Matcher::Match

Public Instance Methods

combine(combinee) click to toggle source
# File lib/metamorpher/matcher/match.rb, line 17
def combine(combinee)
  if combinee.matches?
    Match.new(root: root, substitution: combinee.substitution.merge(substitution))
  else
    NoMatch.new
  end
end
match_for(variable) click to toggle source
# File lib/metamorpher/matcher/match.rb, line 13
def match_for(variable)
  substitution[variable.name]
end
matches?() click to toggle source
# File lib/metamorpher/matcher/match.rb, line 9
def matches?
  true
end