CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/ui/console/table_print/rank_styler.rb
Views: 11789
1
# -*- coding: binary -*-
2
3
module Msf
4
module Ui
5
module Console
6
module TablePrint
7
class RankStyler
8
9
def style(rank)
10
case rank
11
when Msf::RankingName[Msf::GreatRanking]
12
"%grn#{rank}%clr"
13
when Msf::RankingName[Msf::ExcellentRanking]
14
"%grn#{rank}%clr"
15
else
16
rank.to_s
17
end
18
end
19
end
20
end
21
end
22
end
23
end
24
25