Class: Zypper::Upgraderepo::ReportView

Inherits:
Object
  • Object
show all
Defined in:
lib/zypper/upgraderepo/utils.rb

Class Method Summary collapse

Class Method Details

.alternative(num, repo, max_col, alt) ⇒ Object



101
102
103
104
105
106
# File 'lib/zypper/upgraderepo/utils.rb', line 101

def self.alternative(num, repo, max_col, alt)
  puts " #{num.to_s.rjust(2).bold.red} | Status: #{'Not Found'.bold.red}"
  puts " #{' ' * 2} | Hint: #{alt[:message].bold.yellow}"
  puts " #{' ' * 2} | #{'Suggested:'.bold.yellow} #{alt[:url]}" unless alt[:url].to_s.empty?
  self.info(repo)
end

.available(num, repo, max_col) ⇒ Object



85
86
87
88
# File 'lib/zypper/upgraderepo/utils.rb', line 85

def self.available(num, repo, max_col)
  puts " #{num.to_s.rjust(2).bold.green} | Status: #{'Ok'.bold.green}"
  self.info(repo)
end


116
117
118
# File 'lib/zypper/upgraderepo/utils.rb', line 116

def self.footer
  self.separator
end

.header(max_col) ⇒ Object



112
113
114
# File 'lib/zypper/upgraderepo/utils.rb', line 112

def self.header(max_col)
  puts "  # | Report"
end

.not_found(num, repo, max_col) ⇒ Object



96
97
98
99
# File 'lib/zypper/upgraderepo/utils.rb', line 96

def self.not_found(num, repo, max_col)
  puts " #{num.to_s.rjust(2).bold.red} | Status: #{'Not Found'.bold.red}"
  self.info(repo)
end

.redirected(num, repo, max_col, redirected) ⇒ Object



90
91
92
93
94
# File 'lib/zypper/upgraderepo/utils.rb', line 90

def self.redirected(num, repo, max_col, redirected)
  puts " #{num.to_s.rjust(2).bold.yellow} | Status: #{'Redirected'.bold.yellow}"
  puts " #{' ' * 2} | #{'To:'.bold.yellow} #{redirected}"
  self.info(repo)
end

.separatorObject



108
109
110
# File 'lib/zypper/upgraderepo/utils.rb', line 108

def self.separator
  puts '-' * 90
end