# frozen_string_literal: true module MrCommon # Implements custom field values when exporting Registration records as CSV. class RegistrationDecorator < SimpleDelegator def preregistered? __getobj__.preregistered? ? "YES" : "NO" end def confirmed? __getobj__.confirmed? ? "YES" : "NO" end if MrCommon.registration_confirmation_strategy == :pre_register def pre_registered? PreRegistration.exists_for?(__getobj__) ? "YES" : "NO" end end end end