free_mutant/lib/mutant/mutator/util.rb
Tim Chambers fe72c94b94 Fix miscellaneous typos
Mostly in comments and documentation, but one method name was corrected to match documentation.
2014-08-07 09:00:31 -07:00

43 lines
795 B
Ruby

module Mutant
class Mutator
# Namespace for utility mutators
class Util < self
# Run utility mutator
#
# @param [Object] object
# @param [Object] parent
#
# @return [Enumerator<Object>]
# if no block given
#
# @return [self]
# otherwise
#
# @api private
#
def self.each(object, parent, &block)
return to_enum(__method__, object, parent) unless block_given?
new(object, parent, block)
self
end
private
# Test if mutation is new
#
# @param [Object] generated
#
# @return [Boolean]
#
# @api private
#
def new?(generated)
!input.eql?(generated)
end
end # Util
end # Mutator
end # Mutant