Class: Taski::Progress::Layout::ThemeDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Taski::Progress::Layout::ThemeDrop
- Defined in:
- lib/taski/progress/layout/theme_drop.rb
Overview
Liquid Drop for Theme to enable method access from filters/tags. Wraps a Theme instance and delegates color/icon/spinner methods.
Instance Method Summary collapse
- #color_dim ⇒ Object
- #color_green ⇒ Object
-
#color_red ⇒ Object
Color methods.
- #color_reset ⇒ Object
- #color_yellow ⇒ Object
-
#format_count(count) ⇒ Object
Formatting methods (used by filters).
- #format_duration(ms) ⇒ Object
- #icon_failure ⇒ Object
- #icon_pending ⇒ Object
- #icon_skip ⇒ Object
-
#icon_success ⇒ Object
Status icons.
-
#initialize(theme) ⇒ ThemeDrop
constructor
A new instance of ThemeDrop.
- #render_interval ⇒ Object
-
#spinner_frames ⇒ Object
Spinner settings.
- #spinner_interval ⇒ Object
-
#truncate_list_separator ⇒ Object
List truncation settings.
- #truncate_list_suffix ⇒ Object
-
#truncate_text_suffix ⇒ Object
Text truncation settings.
Constructor Details
#initialize(theme) ⇒ ThemeDrop
Returns a new instance of ThemeDrop.
16 17 18 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 16 def initialize(theme) @theme = theme end |
Instance Method Details
#color_dim ⇒ Object
24 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 24 def color_dim = @theme.color_dim |
#color_green ⇒ Object
22 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 22 def color_green = @theme.color_green |
#color_red ⇒ Object
Color methods
21 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 21 def color_red = @theme.color_red |
#color_reset ⇒ Object
25 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 25 def color_reset = @theme.color_reset |
#color_yellow ⇒ Object
23 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 23 def color_yellow = @theme.color_yellow |
#format_count(count) ⇒ Object
Formatting methods (used by filters)
39 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 39 def format_count(count) = @theme.format_count(count) |
#format_duration(ms) ⇒ Object
40 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 40 def format_duration(ms) = @theme.format_duration(ms) |
#icon_failure ⇒ Object
34 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 34 def icon_failure = @theme.icon_failure |
#icon_pending ⇒ Object
35 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 35 def icon_pending = @theme.icon_pending |
#icon_skip ⇒ Object
36 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 36 def icon_skip = @theme.icon_skip |
#icon_success ⇒ Object
Status icons
33 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 33 def icon_success = @theme.icon_success |
#render_interval ⇒ Object
30 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 30 def render_interval = @theme.render_interval |
#spinner_frames ⇒ Object
Spinner settings
28 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 28 def spinner_frames = @theme.spinner_frames |
#spinner_interval ⇒ Object
29 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 29 def spinner_interval = @theme.spinner_interval |
#truncate_list_separator ⇒ Object
List truncation settings
43 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 43 def truncate_list_separator = @theme.truncate_list_separator |
#truncate_list_suffix ⇒ Object
44 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 44 def truncate_list_suffix = @theme.truncate_list_suffix |
#truncate_text_suffix ⇒ Object
Text truncation settings
47 |
# File 'lib/taski/progress/layout/theme_drop.rb', line 47 def truncate_text_suffix = @theme.truncate_text_suffix |