Module: Taski::Progress::Layout::Tree
- Defined in:
- lib/taski/progress/layout/tree.rb,
lib/taski/progress/layout/tree/live.rb,
lib/taski/progress/layout/tree/event.rb,
lib/taski/progress/layout/tree/structure.rb
Overview
Tree layout module for hierarchical task display. Renders tasks in a tree structure with visual connectors.
Contains two implementations:
- Tree::Live — TTY periodic-update with spinner animation
- Tree::Event — Non-TTY event-driven incremental output
Use Tree.for to automatically select the appropriate implementation.
Defined Under Namespace
Modules: Structure Classes: Event, Live
Class Method Summary collapse
-
.for(output: $stderr, theme: nil) ⇒ Tree::Live, Tree::Event
Factory method to create the appropriate tree layout.
Class Method Details
.for(output: $stderr, theme: nil) ⇒ Tree::Live, Tree::Event
Factory method to create the appropriate tree layout. Returns Tree::Live for TTY outputs, Tree::Event otherwise.
32 33 34 35 36 37 38 |
# File 'lib/taski/progress/layout/tree.rb', line 32 def self.for(output: $stderr, theme: nil) if output.respond_to?(:tty?) && output.tty? Live.new(output: output, theme: theme) else Event.new(output: output, theme: theme) end end |