class T::Enum

def to_str

def to_str
  msg = 'Implicit conversion of Enum instances to strings is not allowed. Call #serialize instead.'
  if T::Configuration.legacy_t_enum_migration_mode?
    T::Configuration.soft_assert_handler(
      msg,
      storytime: {class: self.class.name},
    )
    serialize.to_s
  else
    raise NoMethodError.new(msg)
  end
end