Class: RedmineInstaller::Command::SilentFormatter
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
Returns a new instance of SilentFormatter.
70
71
72
|
# File 'lib/redmine-installer/command.rb', line 70
def initialize
@output = ''
end
|
Instance Method Details
#print_end(success) ⇒ Object
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
|
#print_line(line) ⇒ Object
80
81
82
|
# File 'lib/redmine-installer/command.rb', line 80
def print_line(line)
@output << line
end
|
#print_title(title) ⇒ Object
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
|