ActionMailer::Preview
End-of-program codegen: for every mailer class, each public instance
method (the "actions") gets a class-level twin returning a lazy
MessageDelivery — the analog of Rails' class-level method_missing —
plus a serialized-args dispatcher (__deliver) used by
MailDeliveryJob, and a name lookup (ActionMailer.lookup_mailer).
Constructors
Class methods
Builds the preview instance with params and calls the email
method (Rails: new(params).public_send(email)).
Overridden per subclass by end-of-program codegen (base.cr): the compile-time-known public email methods.
"UserMailerPreview" → "user_mailer" (underscored, no suffix).
Runtime to_s (the class name) so it stays correct through
virtual dispatch from Preview.all.
Instance methods
String-dispatch twin of Ruby's public_send — replaced per subclass by a case ladder over the compile-time-known methods.