Nuke dead code and clean up naming
This commit is contained in:
parent
ad972bcc00
commit
4213789903
3 changed files with 13 additions and 23 deletions
|
@ -15,18 +15,18 @@ module Mutant
|
|||
|
||||
# Return method matcher
|
||||
#
|
||||
# @param [Cache] cache
|
||||
# @param [Env] env
|
||||
#
|
||||
# @return [Matcher::Method]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def matcher(cache)
|
||||
methods_matcher = MATCHERS.fetch(scope_symbol).new(cache, scope)
|
||||
def matcher(env)
|
||||
methods_matcher = MATCHERS.fetch(scope_symbol).new(env, scope)
|
||||
method = methods_matcher.methods.detect do |meth|
|
||||
meth.name.equal?(method_name)
|
||||
end or raise NameError, "Cannot find method #{identifier}"
|
||||
methods_matcher.matcher.build(cache, scope, method)
|
||||
methods_matcher.matcher.build(env, scope, method)
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -71,16 +71,6 @@ module Mutant
|
|||
match[__method__]
|
||||
end
|
||||
|
||||
# Return matcher class
|
||||
#
|
||||
# @return [Class:Mutant::Matcher]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def methods_matcher(cache)
|
||||
MATCHERS.fetch(scope_symbol).new(cache, scope)
|
||||
end
|
||||
|
||||
end # Method
|
||||
end # Expression
|
||||
end # Mutant
|
||||
|
|
|
@ -15,14 +15,14 @@ module Mutant
|
|||
|
||||
# Return method matcher
|
||||
#
|
||||
# @param [Cache] cache
|
||||
# @param [Env] env
|
||||
#
|
||||
# @return [Matcher::Method]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def matcher(cache)
|
||||
MATCHERS.fetch(scope_symbol).new(cache, scope)
|
||||
def matcher(env)
|
||||
MATCHERS.fetch(scope_symbol).new(env, scope)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -26,14 +26,14 @@ module Mutant
|
|||
|
||||
# Return matcher
|
||||
#
|
||||
# @param [Cache] cache
|
||||
# @param [Env] env
|
||||
#
|
||||
# @return [Matcher]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def matcher(cache)
|
||||
Matcher::Namespace.new(cache, self)
|
||||
def matcher(env)
|
||||
Matcher::Namespace.new(env, self)
|
||||
end
|
||||
|
||||
# Return length of match
|
||||
|
@ -75,14 +75,14 @@ module Mutant
|
|||
|
||||
# Return matcher
|
||||
#
|
||||
# @param [Cache] cache
|
||||
# @param [Cache] env
|
||||
#
|
||||
# @return [Matcher]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def matcher(cache)
|
||||
Matcher::Scope.new(cache, Mutant.constant_lookup(namespace), self)
|
||||
def matcher(env)
|
||||
Matcher::Scope.new(env, Mutant.constant_lookup(namespace), self)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue