def serialize_for_env(v)
      case v
      when String
        v
      when NilClass
        nil
      when Array
        JSON.dump(v)
      else
        fail ArgumentError, "Can't represent a #{v.class} in the environment"
      end
    end
def serialize_for_env(v)
      case v
      when String
        v
      when NilClass
        nil
      when Array
        JSON.dump(v)
      else
        fail ArgumentError, "Can't represent a #{v.class} in the environment"
      end
    end
Transform a Ruby value into a String that can be stored in the
 environment. This accepts nil, String, or Array and returns nil, String
 or JSON-serialized Array.