def transformed_value(value)
      return value unless transform

      transformed = Array(value).map(&transform)
      value.is_a?(Enumerable) ? transformed : transformed.first
    end
def transformed_value(value)
      return value unless transform

      transformed = Array(value).map(&transform)
      value.is_a?(Enumerable) ? transformed : transformed.first
    end
Applies a transformation to the given value.

 @param [Object] value
   The new value to be transformed

 If a `transform` was set up for the given option, it is used
 as `to_proc` target when iterating over the value.
 The value is always treated as a collection during this phase.