Class: CommandTower::EmailTheme::Resolver
- Inherits:
-
Object
- Object
- CommandTower::EmailTheme::Resolver
- Defined in:
- app/services/command_tower/email_theme/resolver.rb
Overview
Internal rendering-time collaborator (not a Service/Workflow/Controller).
Assembles the full semantic token set an email template needs: the visual tokens from CommandTower.config.email_theme plus the identity tokens CommandTower already exposes (config.application). Shared by Messaging email templates and, later, CT's own auth mail templates — hence its own top-level namespace rather than living under Messaging::Rendering.
No template calls this yet (Rich Messaging Strategy §12 steps C/D are separate, later slices). This is deliberately not a CommandTower::Services::ApplicationService: it takes no arguments, performs no I/O, and cannot fail under normal config state — there is nothing to validate and nothing to fail. Mirrors Messaging::Rendering::TemplateResolver's own documented exemption.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.resolve ⇒ Object
22 23 24 |
# File 'app/services/command_tower/email_theme/resolver.rb', line 22 def resolve new.resolve end |
Instance Method Details
#resolve ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/services/command_tower/email_theme/resolver.rb', line 27 def resolve theme = CommandTower.config.email_theme { canvas_background: theme.canvas_background, surface_background: theme.surface_background, surface_border: theme.surface_border, primary_text: theme.primary_text, body_text: theme.body_text, muted_text: theme.muted_text, accent: theme.accent, text_on_accent: theme.text_on_accent, primary_action: theme.primary_action, product_name: CommandTower.app_name_for_comms, product_url: CommandTower.config.application.composed_url }.freeze end |