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
37 38 39 40 41 42 |
# File 'lib/dsu/support/command_hookable.rb', line 37 def puts apply_theme('_' * 50, theme_color: color_theme.) # TODO: I18n. puts apply_theme("dsu v#{Dsu::VERSION} | Project: #{project} | Theme: #{color_theme.theme_name}", theme_color: color_theme.) end |
#display_dsu_header ⇒ Object
30 31 32 33 34 35 |
# File 'lib/dsu/support/command_hookable.rb', line 30 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
21 22 23 24 25 26 27 28 |
# File 'lib/dsu/support/command_hookable.rb', line 21 def start(args = ARGV, = {}) display_dsu_header unless suspend_header?(args, ) stderror = Services::StderrRedirectorService.call do super end display_errors_if(stderror) end |