Class: Mutant::Mutator::Util

Inherits:
Mutant::Mutator show all
Defined in:
lib/mutant/mutator/util.rb,
lib/mutant/mutator/util/array.rb,
lib/mutant/mutator/util/symbol.rb

Overview

Namespace for utility mutators

Direct Known Subclasses

Array, Array::Element, Array::Presence, Symbol

Defined Under Namespace

Classes: Array, Symbol

Instance Attribute Summary

Attributes inherited from Mutant::Mutator

#input, #parent

Class Method Summary collapse

Class Method Details

.each(object, parent, &block) ⇒ Enumerator<Object>, self

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Run utility mutator

Parameters:

  • object (Object)
  • parent (Object)

Returns:

  • (Enumerator<Object>)

    if no block given

  • (self)

    otherwise



19
20
21
22
23
24
25
# File 'lib/mutant/mutator/util.rb', line 19

def self.each(object, parent, &block)
  return to_enum(__method__, object, parent) unless block_given?

  new(object, parent, block)

  self
end