class RBT::ShowHowManyFilesAreTracked
Public Class Methods
new( i = ARGV, run_already = true ) { || ... }
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
# File lib/rbt/statistics/show_how_many_files_are_tracked.rb, line 33 def initialize( i = ARGV, run_already = true ) reset set_commandline_arguments(i) # ======================================================================= # # === Handle blocks given # ======================================================================= # if block_given? case yield # === :do_not_use_opn when :do_not_use_opn @internal_hash[:use_opn] = false end end run if run_already end
Public Instance Methods
report_how_many_binaries_are_registered()
click to toggle source
report_how_many_gir_files_are_registered()
click to toggle source
#¶ ↑
report_how_many_gir_files_are_registered
¶ ↑
#¶ ↑
# File lib/rbt/statistics/show_how_many_files_are_tracked.rb, line 115 def report_how_many_gir_files_are_registered i = 0 # ======================================================================= # # We must load the files from the expanded cookbook directory. # ======================================================================= # target_directory = directory_expanded_cookbooks? use_this_key = :gir_files Dir["#{target_directory}*.yml"].each {|this_yaml_file| dataset = load_yaml(this_yaml_file) if dataset.has_key?(use_this_key) gir_files = dataset[use_this_key] unless gir_files.empty? i += gir_files.size end end } e 'There are '+steelblue(i.to_s.rjust(5))+ ' '+steelblue('.gir files')+' '\ 'registered in the RBT project.' end
report_how_many_header_files_are_registered()
click to toggle source
#¶ ↑
report_how_many_header_files_are_registered
¶ ↑
#¶ ↑
# File lib/rbt/statistics/show_how_many_files_are_tracked.rb, line 91 def report_how_many_header_files_are_registered i = 0 # ======================================================================= # # We must load the files from the expanded cookbook directory. # ======================================================================= # target_directory = directory_expanded_cookbooks? use_this_key = :headers Dir["#{target_directory}*.yml"].each {|this_yaml_file| dataset = load_yaml(this_yaml_file) if dataset.has_key?(use_this_key) headers = dataset[use_this_key] unless headers.empty? i += headers.size end end } e 'There are '+steelblue(i.to_s.rjust(5))+' '+ tomato('.h header files')+' '\ 'registered in the RBT project.' end
report_how_many_library_files_are_registered()
click to toggle source
#¶ ↑
report_how_many_library_files_are_registered
¶ ↑
#¶ ↑
# File lib/rbt/statistics/show_how_many_files_are_tracked.rb, line 67 def report_how_many_library_files_are_registered i = 0 # ======================================================================= # # We must load the files from the expanded cookbook directory. # ======================================================================= # target_directory = directory_expanded_cookbooks? use_this_key = :libraries Dir["#{target_directory}*.yml"].each {|this_yaml_file| dataset = load_yaml(this_yaml_file) if dataset.has_key?(use_this_key) libraries = dataset[use_this_key] unless libraries.empty? i += libraries.size end end } e "There are #{steelblue(i.to_s.rjust(5))} "\ "#{tomato('.so / .a library files')} "\ "registered in the RBT project." end
report_how_many_m4_files_are_registered()
click to toggle source
#¶ ↑
report_how_many_m4_files_are_registered
¶ ↑
#¶ ↑
# File lib/rbt/statistics/show_how_many_files_are_tracked.rb, line 139 def report_how_many_m4_files_are_registered i = 0 # ======================================================================= # # We must load the files from the expanded cookbook directory. # ======================================================================= # target_directory = directory_expanded_cookbooks? use_this_key = :m4_files Dir["#{target_directory}*.yml"].each {|this_yaml_file| dataset = load_yaml(this_yaml_file) if dataset.has_key?(use_this_key) m4_files = dataset[use_this_key] unless m4_files.empty? i += m4_files.size end end } e 'There are '+steelblue(i.to_s.rjust(5))+ ' '+steelblue('.m4 files')+' '\ 'registered in the RBT project.' end
report_how_many_programs_are_registered()
click to toggle source
reset()
click to toggle source
#¶ ↑
reset¶ ↑
#¶ ↑
Calls superclass method
RBT::Base#reset
# File lib/rbt/statistics/show_how_many_files_are_tracked.rb, line 55 def reset super() infer_the_namespace # ======================================================================= # # === :use_opn # ======================================================================= # @internal_hash[:use_opn] = true end
run()
click to toggle source
#¶ ↑
run¶ ↑
#¶ ↑
# File lib/rbt/statistics/show_how_many_files_are_tracked.rb, line 179 def run if @internal_hash[:use_opn] opnn { :no_trailing } e end e report_how_many_programs_are_registered # n programs report_how_many_binaries_are_registered # n binaries report_how_many_header_files_are_registered # n header files report_how_many_library_files_are_registered # n library files report_how_many_gir_files_are_registered # n gir files report_how_many_m4_files_are_registered # n m4 files e end