Module: Dsu::Support::CommandHelpColorizable::ClassMethods
- Defined in:
- lib/dsu/support/command_help_colorizeable.rb
Instance Method Summary collapse
- #color_theme ⇒ Object
-
#command_help(shell, subcommand = false) ⇒ Object
Handles sub-command help colorization.
-
#help(shell, subcommand = false) ⇒ Object
Handles general help colorization.
Instance Method Details
#color_theme ⇒ Object
27 28 29 |
# File 'lib/dsu/support/command_help_colorizeable.rb', line 27 def color_theme @color_theme ||= Models::ColorTheme.current_or_default end |
#command_help(shell, subcommand = false) ⇒ Object
Handles sub-command help colorization.
22 23 24 25 |
# File 'lib/dsu/support/command_help_colorizeable.rb', line 22 def command_help(shell, subcommand = false) # rubocop:disable Style/OptionalBooleanParameter help_text = Services::StdoutRedirectorService.call { super } puts apply_theme(help_text, theme_color: color_theme.help) end |
#help(shell, subcommand = false) ⇒ Object
Handles general help colorization.
16 17 18 19 |
# File 'lib/dsu/support/command_help_colorizeable.rb', line 16 def help(shell, subcommand = false) # rubocop:disable Style/OptionalBooleanParameter help_text = Services::StdoutRedirectorService.call { super } puts apply_theme(help_text, theme_color: color_theme.help) end |