class RBT::Action::Statistics::ShowHowManyFilesAreTracked
Public Class Methods
[](i = ARGV)
click to toggle source
new( i = ARGV, run_already = true ) { || ... }
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
# File lib/rbt/actions/individual_actions/statistics/show_how_many_files_are_tracked.rb, line 50 def initialize( i = ARGV, run_already = true, &block ) 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_binaries_are_registered
¶ ↑
#¶ ↑
# File lib/rbt/actions/individual_actions/statistics/show_how_many_files_are_tracked.rb, line 167 def report_how_many_binaries_are_registered e rev+'There are '+steelblue(RBT.all_binaries.keys.uniq.size.to_s.rjust(5))+ "#{rev} binaries registered in the RBT project." end
report_how_many_gir_files_are_registered()
click to toggle source
#¶ ↑
report_how_many_gir_files_are_registered
¶ ↑
#¶ ↑
# File lib/rbt/actions/individual_actions/statistics/show_how_many_files_are_tracked.rb, line 111 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 rev+'There are '+steelblue(i.to_s.rjust(5))+ rev+' '+steelblue('.gir files')+ " #{rev}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/actions/individual_actions/statistics/show_how_many_files_are_tracked.rb, line 87 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 "#{rev}There are #{steelblue(i.to_s.rjust(5))} "\ "#{tomato('.h header files')} "\ "#{rev}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/actions/individual_actions/statistics/show_how_many_files_are_tracked.rb, line 175 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 "#{rev}There are #{steelblue(i.to_s.rjust(5))} "\ "#{tomato('.so / .a library files')} #{rev}"\ "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/actions/individual_actions/statistics/show_how_many_files_are_tracked.rb, line 135 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 rev+'There are '+steelblue(i.to_s.rjust(5))+ rev+' '+steelblue('.m4 files')+rev+ ' registered in the RBT project.' end
report_how_many_programs_are_registered()
click to toggle source
#¶ ↑
report_how_many_programs_are_registered
¶ ↑
#¶ ↑
# File lib/rbt/actions/individual_actions/statistics/show_how_many_files_are_tracked.rb, line 159 def report_how_many_programs_are_registered e rev+'There are '+steelblue(RBT.n_registered_programs?.to_s.rjust(5))+ rev+' programs registered in total in the RBT project.' end
reset()
click to toggle source
#¶ ↑
reset (reset tag)¶ ↑
#¶ ↑
Calls superclass method
RBT::Action#reset
# File lib/rbt/actions/individual_actions/statistics/show_how_many_files_are_tracked.rb, line 75 def reset super() infer_the_namespace # ======================================================================= # # === :use_opn # ======================================================================= # @internal_hash[:use_opn] = true end
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/actions/individual_actions/statistics/show_how_many_files_are_tracked.rb, line 199 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