lib/validation/adjustment.rb
def WHEN(condition, adjuster)
      unless Validation.conditionable? condition
        raise TypeError, 'wrong object for condition'
      end

      unless Validation.adjustable? adjuster
        raise TypeError, 'wrong object for adjuster'
      end

      ->v{_valid?(condition, v) ? adjuster.call(v) : v}
    end
def WHEN(condition, adjuster)
      unless Validation.conditionable? condition
        raise TypeError, 'wrong object for condition'
      end

      unless Validation.adjustable? adjuster
        raise TypeError, 'wrong object for adjuster'
      end

      ->v{_valid?(condition, v) ? adjuster.call(v) : v}
    end
Adjuster Builders
 Apply adjuster when passed condition.
 @param condition [Proc, Method, #===]
 @param adjuster [Proc, #to_proc]
 @return [lambda]