Class: Mutant::Mutation::Config Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/mutation/config.rb

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

Constant Summary collapse

EMPTY =

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

new(
  ignore_patterns: [],
  operators:       nil,
  timeout:         nil
)
DEFAULT =

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

new(
  ignore_patterns: [],
  operators:       Mutation::Operators::Light.new,
  timeout:         nil
)
TRANSFORM =

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

Transform::Sequence.new(
  steps: [
    Transform::Hash.new(
      optional: [
        Transform::Hash::Key.new(
          transform: Transform::Array.new(transform: ignore_pattern),
          value:     'ignore_patterns'
        ),
        Transform::Hash::Key.new(
          transform: Operators::TRANSFORM,
          value:     'operators'
        ),
        Transform::Hash::Key.new(
          transform: Transform::FLOAT,
          value:     'timeout'
        )
      ],
      required: []
    ),
    Transform::Hash::Symbolize.new,
    Transform::Success.new(block: EMPTY.method(:with))
  ]
)

Instance Method Summary collapse

Instance Method Details

#merge(other) ⇒ Object

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.



50
51
52
53
54
55
56
# File 'lib/mutant/mutation/config.rb', line 50

def merge(other)
  with(
    ignore_patterns: other.ignore_patterns.any? ? other.ignore_patterns : ignore_patterns,
    operators:       other.operators || operators,
    timeout:         other.timeout || timeout
  )
end