class RBT::Cookbooks::ShowDependenciesOn
Public Class Methods
Public Instance Methods
add(i)
click to toggle source
fetch_all_programs_that_depend_on_the_given_input()
click to toggle source
#¶ ↑
fetch_all_programs_that_depend_on_the_given_input
¶ ↑
#¶ ↑
# File lib/rbt/cookbooks/show_dependencies_on.rb, line 114 def fetch_all_programs_that_depend_on_the_given_input all_cookbook_files = cookbook_files?(:show_full_path) all_cookbook_files.each {|file| file = File.basename(file) dataset = action(:SanitizeCookbook, file) { :fast } data = dataset.dependencies_on? unless data.nil? add(file) if data.include? input? # Add it if the input is part of the dependencies. end } end
input?()
click to toggle source
notify_the_user_that_this_might_take_a_while()
click to toggle source
#¶ ↑
notify_the_user_that_this_might_take_a_while
¶ ↑
#¶ ↑
# File lib/rbt/cookbooks/show_dependencies_on.rb, line 104 def notify_the_user_that_this_might_take_a_while opne 'Scanning through the available programs next to find out' opne 'which programs depend on '+sfancy(input?)+rev+'. This may '\ 'take a while,' opne 'please be patient.' end
report_which_programs_depend_on_the_given_input( i = @array_programs )
click to toggle source
#¶ ↑
report_which_programs_depend_on_the_given_input
(report tag)¶ ↑
#¶ ↑
# File lib/rbt/cookbooks/show_dependencies_on.rb, line 82 def report_which_programs_depend_on_the_given_input( i = @array_programs ) opne 'These '+sfancy(i.size.to_s)+' programs '\ 'depend on '+simp(input?.to_s)+':' e i.sort.each_with_index {|entry, index| # Sort it alphabetically here. index += 1 index = index.to_s.rjust(i.size.to_s.size) index = slateblue(index.to_s) index = ('('+index.to_s+')').rjust(4) index.sub!(/\(/, royalblue('(')) index.sub!(/\)/, royalblue(')')) entry = teal(entry) e " #{index} #{entry}" } e end
Also aliased as: report
reset()
click to toggle source
#¶ ↑
reset¶ ↑
#¶ ↑
Calls superclass method
RBT::LeanPrototype#reset
# File lib/rbt/cookbooks/show_dependencies_on.rb, line 45 def reset super() infer_the_namespace # ======================================================================= # # === @array_programs # ======================================================================= # @array_programs = [] end
run()
click to toggle source