Class: PendingFromMeleteDecorator

Inherits:
PendingMessageDecorator show all
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.

Instance Method Summary collapse

Methods inherited from PendingMessageDecorator

#render, #render_melete, #render_mneme

Instance Method Details

#render_basicnil

Returns Melete activations are hidden in basic mode.

Returns:

  • (nil)

    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_debugHash

Returns full Melete-activation payload.

Returns:

  • (Hash)

    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_verboseHash

Returns dimmed Melete-activation payload.

Returns:

  • (Hash)

    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