class RBT::PurgeHeadersOfThisProgram
Constants
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
Public Class Methods
[](i = '')
click to toggle source
Public Instance Methods
input?()
click to toggle source
reset()
click to toggle source
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/purge_headers_of_this_program.rb, line 69 def run @cookbook = RBT::Cookbooks::Cookbook.new(input?) { :bypass_menu_check } all_headers = @cookbook.headers? # <- Obtain all registered headers. opnn; e 'This program has the following headers registered:' e all_headers.each {|entry| e " - #{entry}" } e unless all_headers.empty? all_headers.each {|file| target = "/usr/include/#{File.basename(file)}" if File.exist? target opnn; remove_file(target, :be_verbose) end } end end