Class: Msf::Ui::Console::TablePrint::RankFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/msf/ui/console/table_print/rank_formatter.rb

Instance Method Summary collapse

Instance Method Details

#format(rank) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/msf/ui/console/table_print/rank_formatter.rb', line 8

def format(rank)
  if rank.present? && !rank.to_s.match?(/\D/) && Msf::RankingName.key?(rank.to_i)
    Msf::RankingName[rank.to_i]
  else
    rank
  end
end