Class: Moderate::Services::IntakeNotice::NotifierRecipient

Inherits:
Data
  • Object
show all
Defined in:
lib/moderate/services/intake_notice.rb

Overview

The anonymous-notifier recipient. Intentionally tiny and NOT a User: the host’s notify hook reaches ‘recipient.email` / `recipient.name` and nothing else. Frozen value object.

Instance Method Summary collapse

Instance Method Details

#display_nameObject

Mirror the User-ish reader some host mailers reach for, so a notifier and a User are interchangeable at the ‘recipient.email` call site.



128
# File 'lib/moderate/services/intake_notice.rb', line 128

def display_name = name.to_s.empty? ? email : name