class RBT::PurgeHeadersOfThisProgram
Public Class Methods
[](i = ARGV)
click to toggle source
Public Instance Methods
reset()
click to toggle source
#¶ ↑
reset (reset tag)¶ ↑
#¶ ↑
Calls superclass method
RBT::Base#reset
# File lib/rbt/utility_scripts/purge_headers_of_this_program.rb, line 43 def reset super() infer_the_namespace # ======================================================================= # # === @target_base_directory # ======================================================================= # @target_base_directory = '/usr/include/' end
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/purge_headers_of_this_program.rb, line 55 def run @cookbook = RBT::Cookbooks::SanitizeCookbook.new(first_argument?) { :fast } all_headers = @cookbook.headers? # <- Obtain all registered headers. opne 'This program has the following headers registered:' e all_headers.each {|entry| e " - #{entry}" } e unless all_headers.empty? all_headers.each {|file| target = "#{@target_base_directory}#{File.basename(file)}" if File.exist?(target) and File.file?(target) opnn; remove_file(target, :be_verbose) end } end end