lib/mutant/subject.rb in mutant-0.3.0.beta22 vs lib/mutant/subject.rb in mutant-0.3.0.rc1

- old
+ new

@@ -44,11 +44,11 @@ # @return [String] # # @api private # def identification - "#{subtype}:#{source_path}:#{source_line}" + "#{match_expression}:#{source_path}:#{source_line}" end memoize :identification # Return source representation of ast # @@ -82,19 +82,29 @@ def original_root root(node) end memoize :original_root - private - - # Return subtype identifier + # Return match expression # # @return [String] # # @api private # - abstract_method :subtype - private :subtype + abstract_method :match_expression + + # Return match prefixes + # + # @return [Enumerable<String>] + # + # @api private + # + def match_prefixes + [match_expression].concat(context.match_prefixes) + end + memoize :match_prefixes + + private # Return neutral mutation # # @return [Mutation::Neutral] #