Class: PendingFromMeleteDecorator
- Inherits:
-
PendingMessageDecorator
- Object
- Draper::Decorator
- ApplicationDecorator
- PendingMessageDecorator
- PendingFromMeleteDecorator
- Defined in:
- app/decorators/pending_from_melete_decorator.rb
Overview
Shared base for the three Melete-activation pending decorators (skill, workflow, goal). All three share the same TUI shape — a dimmed pending_melete payload with kind + source + truncated content — and only differ on the KIND constant and the per-type Melete transcript line. Subclasses override KIND and render_melete; this base owns everything else.
Direct Known Subclasses
PendingFromMeleteGoalDecorator, PendingFromMeleteSkillDecorator, PendingFromMeleteWorkflowDecorator
Instance Method Summary collapse
-
#render_basic ⇒ nil
Melete activations are hidden in basic mode.
-
#render_debug ⇒ Hash
Full Melete-activation payload.
-
#render_verbose ⇒ Hash
Dimmed Melete-activation payload.
Methods inherited from PendingMessageDecorator
#render, #render_melete, #render_mneme
Instance Method Details
#render_basic ⇒ nil
Returns Melete activations are hidden in basic mode.
11 12 13 |
# File 'app/decorators/pending_from_melete_decorator.rb', line 11 def render_basic nil end |
#render_debug ⇒ Hash
Returns full Melete-activation payload.
27 28 29 30 31 32 33 34 35 |
# File 'app/decorators/pending_from_melete_decorator.rb', line 27 def render_debug { role: :pending_melete, kind: self.class::KIND, source: source_name, content: content, status: "pending" } end |
#render_verbose ⇒ Hash
Returns dimmed Melete-activation payload.
16 17 18 19 20 21 22 23 24 |
# File 'app/decorators/pending_from_melete_decorator.rb', line 16 def render_verbose { role: :pending_melete, kind: self.class::KIND, source: source_name, content: truncate_lines(content, max_lines: 3), status: "pending" } end |