Class: RedmineInstaller::Command::SilentFormatter

Inherits:
BaseFormatter show all
Defined in:
lib/redmine-installer/command.rb

Constant Summary

Constants included from Utils

Utils::PROGRESSBAR_FORMAT

Instance Method Summary collapse

Methods included from Utils

#class_name, #create_dir, #env_user, #error, #logger, #ok, #pastel, #prompt, #run_command

Constructor Details

#initializeSilentFormatter

Returns a new instance of SilentFormatter.



70
71
72
# File 'lib/redmine-installer/command.rb', line 70

def initialize
  @output = ''
end

Instance Method Details



84
85
86
87
88
89
90
91
# File 'lib/redmine-installer/command.rb', line 84

def print_end(success)
  if success
    @spinner.success
  else
    @spinner.error
    puts @output
  end
end


80
81
82
# File 'lib/redmine-installer/command.rb', line 80

def print_line(line)
  @output << line
end


74
75
76
77
78
# File 'lib/redmine-installer/command.rb', line 74

def print_title(title)
  format = "[#{pastel.yellow(':spinner')}] #{title}"
  @spinner = TTY::Spinner.new(format, success_mark: pastel.green(''), error_mark: pastel.red(''))
  @spinner.auto_spin
end