Class: Taski::Progress::Layout::Simple
- Inherits:
-
Base
- Object
- Execution::TaskObserver
- Base
- Taski::Progress::Layout::Simple
- Defined in:
- lib/taski/progress/layout/simple.rb
Overview
Simple layout providing a minimalist single-line progress display. Shows task execution status in a compact format with spinner animation:
⠹ [3/5] DeployTask | Uploading files...
Customization is done through Theme classes:
class MyTheme < Taski::Progress::Theme::Base
def spinner_frames
%w[🌑 🌒 🌓 🌔 🌕 🌖 🌗 🌘]
end
def icon_success
"🎉"
end
def format_count(count)
"#{count}件"
end
def execution_complete
'{% icon %} Done! {{ execution.completed_count | format_count }} tasks in {{ execution.total_duration | format_duration }}'
end
end
layout = Taski::Progress::Layout::Simple.new(theme: MyTheme.new)
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Execution::TaskObserver
Instance Method Summary collapse
-
#initialize(output: $stdout, theme: nil) ⇒ Simple
constructor
A new instance of Simple.
Methods inherited from Base
#on_group_completed, #on_group_started, #on_ready, #on_start, #on_stop, #on_task_updated, #queue_message, #render_template_string, #start_spinner_timer, #stop_spinner_timer, #task_registered?, #task_state
Methods inherited from Execution::TaskObserver
#on_group_completed, #on_group_started, #on_ready, #on_start, #on_stop, #on_task_updated