class RBT::Cookbooks::BatchValidateTheCookbookRecipes
Constants
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
Public Class Methods
[](i = '')
click to toggle source
Public Instance Methods
determine_which_files_to_run()
click to toggle source
input?()
click to toggle source
reset()
click to toggle source
run()
click to toggle source
run_this_file(i)
click to toggle source
#¶ ↑
run_this_file
¶ ↑
#¶ ↑
# File lib/rbt/validation/batch_validate_the_cookbook_recipes.rb, line 72 def run_this_file(i) if i.is_a? Array # ===================================================================== # # First, prevent self-validation .rb file. # ===================================================================== # i.reject! {|entry| entry.include? 'batch_validate_the_cookbook_recipes.rb' } i.each {|entry| run_this_file(entry) } else # ===================================================================== # # We must determine the name of the class. The usual input is # something like: # /Programs/Ruby/2.4.2/lib/ruby/site_ruby/2.4.0/cookbooks/validation/scan_for_missing_last_update_entries.rb # ===================================================================== # load(i) _ = File.basename(i).sub(/\.rb$/,'').dup _ = to_camelcase(_) namespace = 'RBT::Cookbooks::'+_ opnn; e "Now invoking #{slateblue('class '+namespace)}" constant = RBT::Cookbooks.const_get(_) constant.send(:new) # Instantiate it here. end end
Also aliased as: run_these_files