Class: Taski::Progress::Theme::Detail

Inherits:
Default show all
Defined in:
lib/taski/progress/theme/detail.rb

Overview

Detail theme for rich progress display with spinner and icons. Provides spinner animation, colored icons for task states.

Output format:

├── ⠹ DeployTask
│   └── ✓ UploadFiles (1.2s)
└── ✗ MigrateDB: Connection refused

Examples:

Usage

layout = Taski::Progress::Layout::Tree.new(
  theme: Taski::Progress::Theme::Detail.new
)

Instance Method Summary collapse

Methods inherited from Base

#clean_fail, #clean_start, #clean_success, #color_dim, #color_green, #color_red, #color_reset, #color_yellow, #execution_complete, #execution_fail, #execution_running, #execution_start, #format_count, #format_duration, #group_fail, #group_start, #group_success, #icon_failure, #icon_pending, #icon_skip, #icon_success, #render_interval, #spinner_frames, #spinner_interval, #truncate_list_separator, #truncate_list_suffix, #truncate_text_suffix

Instance Method Details

#task_failObject

Task fail with colored icon



37
38
39
# File 'lib/taski/progress/theme/detail.rb', line 37

def task_fail
  "{% icon %} {{ task.name | short_name }}{% if task.error_message %}: {{ task.error_message }}{% endif %}"
end

#task_pendingObject

Task pending with icon



22
23
24
# File 'lib/taski/progress/theme/detail.rb', line 22

def task_pending
  "{% icon %} {{ task.name | short_name }}"
end

#task_skipObject

Task skip with colored icon



42
43
44
# File 'lib/taski/progress/theme/detail.rb', line 42

def task_skip
  "{% icon %} {{ task.name | short_name }}"
end

#task_startObject

Task start with spinner



27
28
29
# File 'lib/taski/progress/theme/detail.rb', line 27

def task_start
  "{% spinner %} {{ task.name | short_name }}"
end

#task_successObject

Task success with colored icon



32
33
34
# File 'lib/taski/progress/theme/detail.rb', line 32

def task_success
  "{% icon %} {{ task.name | short_name }}{% if task.duration %} ({{ task.duration | format_duration }}){% endif %}"
end