Module: Dsu::Support::CommandHookable::ClassMethods
- Defined in:
- lib/dsu/support/command_hookable.rb
Instance Method Summary collapse
- #display_dsu_footer ⇒ Object
- #display_dsu_header ⇒ Object
- #start(args = ARGV, options = {}) ⇒ Object
Instance Method Details
#display_dsu_footer ⇒ Object
36 37 38 39 40 41 |
# File 'lib/dsu/support/command_hookable.rb', line 36 def puts apply_theme('_' * 35, theme_color: color_theme.) # TODO: I18n. puts apply_theme("dsu | Version: #{Dsu::VERSION} | Theme: #{color_theme.theme_name}", theme_color: color_theme.) end |
#display_dsu_header ⇒ Object
29 30 31 32 33 34 |
# File 'lib/dsu/support/command_hookable.rb', line 29 def display_dsu_header if Dsu.env.screen_shot_mode? puts apply_theme('Running screen shot mode!', theme_color: color_theme.warning) puts "#{Dsu.env.screen_shot_prompt} dsu #{ARGV.join(' ')}" end end |
#start(args = ARGV, options = {}) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/dsu/support/command_hookable.rb', line 20 def start(args = ARGV, = {}) display_dsu_header unless suspend_header?(args, ) stderror = Services::StderrRedirectorService.call do super end display_errors_if(stderror) end |