Module: Display
- Included in:
- Ardecy::Harden, Ardecy::Harden::CmdLine::LineInc, Ardecy::Harden::Modules::Drop, Ardecy::Harden::Mountpoint::MountInc, Ardecy::Harden::Perms::DirCheck, Ardecy::Harden::Sysctl::SysKern
- Defined in:
- lib/display.rb
Instance Method Summary collapse
- #display_fix_list(list) ⇒ Object
- #kernel_show(line, exp) ⇒ Object
- #perm_show(line, exp) ⇒ Object
- #result(res, ntab = 3) ⇒ Object
- #show_bad_mod(name) ⇒ Object
- #title(name) ⇒ Object
Instance Method Details
#display_fix_list(list) ⇒ Object
25 26 27 |
# File 'lib/display.rb', line 25 def display_fix_list(list) list.each { |l| puts " - #{l}" } if list.length >= 2 end |
#kernel_show(line, exp) ⇒ Object
11 12 13 |
# File 'lib/display.rb', line 11 def kernel_show(line, exp) print " - #{line} (exp: #{exp})" end |
#perm_show(line, exp) ⇒ Object
15 16 17 18 19 |
# File 'lib/display.rb', line 15 def perm_show(line, exp) print " - #{line} (exp: < " printf "%04o", exp print ")" end |
#result(res, ntab = 3) ⇒ Object
21 22 23 |
# File 'lib/display.rb', line 21 def result(res, ntab = 3) puts "\t" * ntab + "[ #{res} ]" end |
#show_bad_mod(name) ⇒ Object
29 30 31 |
# File 'lib/display.rb', line 29 def show_bad_mod(name) print " - Checking if #{name} is not available" end |
#title(name) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/display.rb', line 4 def title(name) l = name.length puts " [+] #{name} " puts '-' * l * 2.9 puts end |