Module: Dsu::Support::CommandHookable::ClassMethods

Defined in:
lib/dsu/support/command_hookable.rb

Instance Method Summary collapse

Instance Method Details



37
38
39
40
41
42
# File 'lib/dsu/support/command_hookable.rb', line 37

def display_dsu_footer
  puts apply_theme('_' * 50, theme_color: color_theme.dsu_footer)
  # TODO: I18n.
  puts apply_theme("dsu v#{Dsu::VERSION} | Project: #{project} | Theme: #{color_theme.theme_name}",
    theme_color: color_theme.dsu_footer)
end

#display_dsu_headerObject



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, options = {})
  display_dsu_header unless suspend_header?(args, options)
  stderror = Services::StderrRedirectorService.call do
    super
  end
  display_errors_if(stderror)
  display_dsu_footer
end