Mutare.Mutators.PeriodBoundary (mutare v0.1.2)

Copy Markdown View Source

Exchanges the beginning and end of a calendar period:

  • Date.beginning_of_monthDate.end_of_month
  • Date.beginning_of_weekDate.end_of_week
  • NaiveDateTime.beginning_of_dayNaiveDateTime.end_of_day

Only the function name changes. Optional arguments are retained, so Date.beginning_of_week(date, :sunday) becomes Date.end_of_week(date, :sunday). The weekday may be changed separately by Mutare.Mutators.ModeSwap.

Mutare.Mutators.CallRemoval may produce another mutant at the same call by removing the boundary operation entirely. This family retains the call and changes its direction.

Direct, aliased, and imported calls are supported. An alias that resolves to another module does not match. This family is enabled by default.