free_mutant/lib/mutant/matcher/method/instance.rb
Markus Schirp d50ecc483d Cleanup missing whitespace after comma
* There must be a code metric tool helping me in converting my style.
2012-07-31 04:10:37 +02:00

46 lines
898 B
Ruby

module Mutant
class Matcher
class Method < Matcher
# Matcher for instance methods
class Instance < Method
private
# Return method instance
#
# @return [UnboundMethod]
#
# @api private
#
def method
constant.instance_method(method_name)
end
# Return matched node class
#
# @return [Rubinius::AST::Define]
#
# @api private
#
def node_class
Rubinius::AST::Define
end
# Return matched node
#
# @return [Rubinus::AST::Define]
#
# @api private
#
def matched_node
last_match = nil
ast.walk do |predicate, node|
last_match = node if match?(node)
predicate
end
last_match
end
end
end
end
end